jquery prepend to body not working for me -


i'm trying use jquery prepend couple of hidden input tags start of body of jsp.

$("body").prepend('<input id="scroll_offset_x" name="scroll_offset_x" type="hidden" value="<%=myjsppagevariablex%>"/>'); $("body").prepend('<input id="scroll_offset_y" name="scroll_offset_y" type="hidden" value="<%=myjsppagevariabley%>"/>'); 

for reason these not appearing when use firebug view html. doing wrong here?

kind regards,

jason.

i stumbled across question whilst having same problem. know old post, i'm going answer anyway.

basically, have give body tag class, or better still, id, , use selector. it's shame can't use body, we'll have live without


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -