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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -