SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Enthusiast greedyman's Avatar
    Join Date
    Jun 2012
    New World
    0 Post(s)
    0 Thread(s)

    Question Keep states of jQuery at many pages

    I have created Hover Menu with jQuery (working with PHP MVC). Assuming that I have a menu like this:

    I put class active in blog link. Please see my codes:

    PHP Code:
    meta http-equiv="ContentType" content="text/html; charset=utf8" />
    title>Hover Menu with jQuery and CSS</title>
    link rel="stylesheet" type="text/css" href="style.css" />
    script type="text/javascript" src="jquery-1.3.2.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('').click(function() {
    But, when I click about link, class active is still in blog link and it's not in about link. I searched, I know that when I click other link, jQuery is reloaded so my code don't work. Have you any solution?
    Attached Images Attached Images


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts