jquery - How to select a specific HTML page thruogh javascript -


does know how write function select specific page in javascript? reason why asking because have multiple projects use same base master pages , placeholders. need able change of projects individual pages (css & html) out changes of pages in particular project.

my javascript code:

function initpage() {     $('div#rightcontent img').replacewith('<img src="newpicfile.jpg">'); } 

the problem code changes of divs id of rightcontent. need target 1 page in particular. can me?

place in code -

function initpage() {         if("http://mydomain.com/page.html" == location.href) {          $('div#rightcontent img').replacewith('<img src="newpicfile.jpg">');     } } 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -