I simply want to manipulate the elements within the #content div, but $(\'#content\')
doesn\'t seem to work, and yet in other places it does! My relevant code i
For this question you should go straight to jsfiddle, and to the jquery docs for how to get attributes of html elements -> http://api.jquery.com/attr/.
The jQuery selector object itself doesn't have an attribute id
. You have to use .attr('id')
function.
I fixed that and everything else works, as you see in this jsfiddle: http://jsfiddle.net/AdtrX/1/