Forums

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

Home Forums JavaScript Detect on what page are you with jQuery Re: Detect on what page are you with jQuery

#128578
CrocoDillon
Participant

Or as a one-liner (well, after `pathname` that is…): `$(‘[href*=”‘+pathname+'”]’).addClass(‘selected’);` ;)