Skip to main content
Known Participant
April 22, 2014
Answered

How to use "#" sign in jQuery For id?

  • April 22, 2014
  • 3 replies
  • 662 views

How to use "#" sign in jQuery For id? When i try to use it like ($('#PropertyAttributeValue').css('color', 'red');)  i got error like following:

The CFML compiler was processing:

  • An expression that began on line 64, column 37.
    The expression might be missing an ending #, for example, #expr instead of #expr#.
  • The body of a cfoutput tag beginning on line 19, column 18.
This topic has been closed for replies.
Correct answer tribule

Use two hashes to escape the first:

($('##PropertyAttributeValue').css('color', 'red');)

3 replies

tribuleCorrect answer
Legend
April 22, 2014

Use two hashes to escape the first:

($('##PropertyAttributeValue').css('color', 'red');)

Known Participant
April 22, 2014

Thanks it works..

BKBK
Community Expert
Community Expert
April 22, 2014

Great! Please kindly mark the answer as 'correct'. Thanks.