How to escape '$' and '#' in Facelets/EL?

后端 未结 2 1646
我在风中等你
我在风中等你 2020-12-18 03:24

I\'m using Java Facelets and jQuery, however the expression

$(\'...\')

in jQuery conflicts with EL expression, how do I escape the jQuery\'

2条回答
  •  误落风尘
    2020-12-18 04:11

    This should normally not conflict. EL uses ${} syntax. Anyway, you could either use jQuery() instead (the $() is just a shorthand) or simply put JS code in its own .js file.

提交回复
热议问题