I am trying to add some additional html to a div with id slideshow using jQuery. My code:
$("#slideshow").append("<a id="prev" title="Previous Slide">Previous Slide</a><a id="next" title="Next Slide">Next Slide</a>");
This isn’t working, can anyone tell me what I am doing wrong?
You’re mixing quotes.
Your string goes from the first
"to the second", meaning that the string only contains"<a id=". The string is followed by the identifierprev, then another string, creating a syntax error.Change the outer quotes around the string to
', like this: