How to proprly write string using jQuery -
I have a little jQuery with HTML, unfortunately it is not working correctly, can someone please advise How should he be happy?
Bred = ("& lt; div class = 'TakeMeTo' style = 'width: + width +" px; right: "+ width +"' & gt; + + "" & Lt; / div & gt; ");Thank you for your help in advance
I'm sure What is the meaning of "This is not working properly" from what you mean? Whatever the case, you can usually build dynamic HTML in such a way as:
Pre var bred = $ ("div> ") . AddClass ("TakeMeTo"). CSS ("width", width + "px"). CSS ("true", width). Text (from where); Instead of setting the style
attribute directly to , use CSS ()
. Alternatively you may want to use .html (whereTo)
, which is appropriate, as appropriate.
Why do so? Things will survive correctly.
Comments
Post a Comment