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

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

c# - Avoiding duplicate methods for Task and Task<T> -

javascript - Which segment of a polyline was clicked? -