Using Jquery in a page

Community Forums Forums Design Tips and Tricks Using Jquery in a page

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Robin 1 year, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #58230

    notfarnow
    Participant
    Post count: 18

    Can someone show me the basics of how and where to load and use jquery in a page.
    It will be used in 4 pages – not every page. Please let me know which files to edit.

    I’m looking to create a show / hide button for some text content.
    Perhaps something like this: http://www.w3schools.com/jquery/jquery_hide_show.asp
    I’m open to any suggestions.

    #58382

    Robin
    Participant
    Post count: 318

    You can put the script itself anywhere in your child theme (often /yourtheme/lib/js/myscript.js). This codex page talks about how to set it up in your functions.php file. And this awesome page should help you sort out the conditional statements to load it on just the pages you want.

    Good luck! HTH


    I do the best I can with what I’ve got. (say hey on twitter)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.