I am trying to run some jQuery script on a specific page, but only if a specific page is loaded.
Scenario: we have one page that loads (i.e. webpage.aspx), and loads other content based on a link click. (i.e. webpage.aspx? contentId = 1, webpage.aspx? contentId = 2, webpage.aspx? contentId = 3, etc.). Here is my problem. I need to delete a specific part of the page if I pull out only one specific content. I am trying to do this in jQuery and don't seem to understand.
This is what I have worked with so far. I understand that this is not correct, but hopefully this gives you a starting point for work.
Thank.
CODE:
$(window).load(function() {
var $deleteNewRow = $("div.col.w140 tbody:first").find("td:first").parent().remove();
if($('#dealer-info h1').indexOf('Ferrari') != -1) {
$deleteNewRow
}
});