Saturday, 15 June 2013

jquery - How to change/add content inside javascript -


I'm trying to explain how to add some text or adsense to whatever I want to believe. JS

Below is a working lightbox with a description caption, and the caption that I want to change.

Code here:

  captionOn = function (var details = $ CurrEl.attr ('title'); Console.log (description); If (details! = Undefined & details.labby & gt; 0) {$ ('& lt; div id = "imagelightbox-caption"> gt;' + description + '& lt; / div & gt;') . AppendTo ('body'); }}, Captionoff = function () {$ ('# Emailslit box-caption'). Remove (); },  

I have come to know that whatever I need to change is somewhere + details + I try to change the description of the word with plain text and without two + symbols It breaks the lightbox, which means that the + description + is required for the lightbox to work, so I tried to use it instead:

  + "& Lt; div class = "align_left" & gt; + Description + "& lt; / div & gt;" + "Div" div class = "align_right" & gt; + Adsense_code + "& lt; / div & gt;" +  

But this does not work, either with or without the + sign.

So for now I am out of all the ideas and in search of the details, it may be a good thing for the audience to see the image, but then again I would like the text or the code How do I add?

You need to put plain text in quotation marks to work. Description is a variable

  $ ('id id = "imagelightbox-caption" & gt;' + "This is my desired text." + '& Lt; / div & gt;') . AppendTo ('body');  

No comments:

Post a Comment