Home › Forums › JavaScript › jQuery Question › Re: jQuery Question
July 19, 2010 at 10:04 am
#79947
Participant
you can use the class from the body when on the home page:
<body class="home page page-id-4 page-template page-template-default">
you can do something like:
if($(‘body[class$="home"]’))
{
…
}
This checks the class attribute to see if home is listed. if so only the code inside the if statement will execute.