WordPress.org

Ready to get started?Download WordPress

Forums

jQuery toggle effect issues with external links (3 posts)

  1. Stacie
    Member
    Posted 4 years ago #

    I am using a toggle effect on one of the pages of my blog. Everything is working correctly, except for the links in the drop downs. When I click on a link, instead of going to the webpage, it just closes the toggle dropdown. What am I doing wrong?

    Here is a copy of the html I am using:

    <li class="profile" style="text-align: left;"> {a href="#"}<span style="font-size:large;"><b>Park Maps</b></span>
    <p style="display: none;">The following maps are available for downloading from the National Park Service:
    ► {a href="http://www.nps.gov/grsm/planyourvisit/upload/grsmmap1.pdf"}<span style="font-size:large;"><font color="#c56907">Park Map</font></span> - Map with the locations of all park roads, visitor centers, picnic areas, and campgrounds.
    ► {a href="http://www.nps.gov/grsm/planyourvisit/upload/GSMNP%20Backcountry%20Map.pdf"}<span style="font-size:large;"><font color="#c56907">Trail Map</font></span> - Map of all the official hiking trails in the park. This map also includes the location of backcountry campsites and shelters, front country campgrounds, and roads in the park.
    ► {a href="http://www.nps.gov/grsm/planyourvisit/upload/GRSMmap2.pdf"}<span style="font-size:large;"><font color="#c56907">Regional Map</font></span> - Map showing major highways providing access to the national park.
    </p>
    {/li}
    {/ul}

  2. Stacie
    Member
    Posted 4 years ago #

    I replaced some of the <> in the code above with {} in order to show the entire code.

  3. Stacie
    Member
    Posted 4 years ago #

    This is the Javascript used:

    jQuery(function() {
    jQuery("li.profile a").click(function(e) {
    jQuery(e.target).closest("li").find("p").toggle();
    return false;
    })
    });

Topic Closed

This topic has been closed to new replies.

About this Topic