Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help with CSS integration into wordpress Re: Help with CSS integration into wordpress

#81581
Kestral
Member
"ArchDesignLabs" wrote:
Ok, I dont have much jquery experience at all but I could give this a go. If there are any other ways please let me know and thanks for the help thus far!

This all can be done with pure JavaScript, however, without the jQuery it can get confusing and more complex than what it should be.

Code:
$("#spc-loc:contains(‘index.php’)")

Is more flexible than:

Code:
var text = document.getElementById(‘spc-loc’).innerHTML;
if(text == "index.php") {
... do stuff ...
}

And is really self explanatory. Elements with (Not an if statement, per se) #spc-loc that contain ‘index.php,’ in the parent find .ico who immediately follows .home and add the class ‘current.’

I recommend go through jQuery’s documentation if you wish to learn jQuery; and of course, Chris’ articles are a big help, too.