Forums

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

Home Forums JavaScript How to get JavaScript to detect URL and output a different link to a stylesheet?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32407
    barkins
    Member

    Basically, I’m looking for JavaScript to detect whether a URL equals a specified URL and output a link to a different style sheet depending on that. Any help would be immensely appreciated. Thanks

    #50469
    stefanbar
    Member
    $(document).ready(function () {
    if (window.location == "http://www.domain.com/specifiedURL/") {
    // add custom stylesheet...
    }
    });
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.