Jump to content

Search the Community

Showing results for tags 'anchors'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I have a page with 2 divs that can be hidden. Now when I load the page the URL looks as follows www.example.com/wedding.php#pyromusicals or it could be www.example.com/wedding.php#just-fireworks now im trying to hide a different div depending on the anchor value and if there is no anchor then hide them both. Here is my code so far $(document).ready(function() { // Get # parameter var param = document.URL.split('#')[1]; if (param == 'pyromusicals') { $(".hidden-div2").hide(); } else if (param == 'purely-fireworks') { $(".hidden-div1").hide(); } }); The problem is that on page load neither works but if you manually hit refresh then the jquery starts working. The links on the page are just html links <li><a href="/wedding-fireworks.php#pyromusicals" title="View information about pyromusical displays for weddings">Pyromusicals</a></li> <li><a href='/wedding-fireworks.php#purely-fireworks' title="View information about wedding fireworks"><span>Purely Fireworks</span></a></li> Any ideas. I am completely new to java and jquery so I'd have no idea where to begin trouble shooting this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.