Adding html via Jquery but page just keeps refreshing -
i don't have access change html directly on page i'm using jquery add text. have code far:
$(document).ready(function(){ if(window.location.href='http://somepage.com') { $(".rightborder.eq(2)").append("<p>some text</p>"); }
the problem text gets added page keeps refreshing, doing loop cannot end. can see why?
thanks
dan
you assigning new href property, need check instead:
if(window.location.href === 'http://somepage.com')
Comments
Post a Comment