• sweetph

    (@sweetph)


    Hello all,

    I have been searching this forum, other forums, and all over the web for answers to this question…I am a beginner with jquery, Repeat – I am a beginner with jquery and I need help with each step of the process of adding a jquery script, from start to finish.

    The script I want to add is here:

    http://tympanus.net/codrops/2010/03/09/a-fresh-bottom-slide-out-menu-with-jquery/

    I want to add it on my homepage in the theme I’m using.

    1) How do I call the jquery (wp_enqueue_script)
    2) Where do I place this (above)
    3) CSS – do I simply append the css from the script to my style.css file?
    4) How do I call the script to action on the wordpress page?
    5) How do I incorporate the html?

    These are some of the questions that I have. I’ve been searching all over the net and usually people assume that people know how to incorporate javascript libraries into their themes….well some of us beginners need help πŸ™‚

    I really just need assistance with ANY script, so if someone could just walk me through it here, it would REALLY be awesome! I have been at this for a week now and I really need help…

    Any assistance is appreciated!

    ~T

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    (@esmi)

    Thread Starter sweetph

    (@sweetph)

    Thanks esmi, I’ve looked at these codexes and I do not understand them. I need someone to help me step by step with a real live working example. Can you do that?

    Here’s the script I want to use:

    http://tympanus.net/codrops/2010/03/09/a-fresh-bottom-slide-out-menu-with-jquery/

    esmi

    (@esmi)

    There ere examples on the page I linked to above. If this level of coding is beyond you, perhaps you need to consider hiring someone to carry out the work for you.

    Thread Starter sweetph

    (@sweetph)

    I’m looking for help on this forum, I’m sure someone out there is willing to help a newbie. Thanks anyway esmi…Is there anyone out there willing to help me?

    I’ve been asking this same question for months and I’ve gotten no answer. Been trying to add a thumbnail scroller on my child theme index page using JQUERY. So far no plug-in is available that shows only the thumbnails (not the slide above) and links to corresponding Post or Pages. I can do this with JQUERY, But It won’t add the js script unless I call JQUERY on this page. Def need help also.

    btw It seems that the info in the search results only brings forth outdated information. Nowhere is there any info on adding this to the latest 3.2.1 version of WordPress.

    1) How do I call the jquery (wp_enqueue_script)
    Put this in your functions.php file and reference files accordingly

    function my_init() {
    	if (!is_admin()) {
    		wp_deregister_script('jquery');
    		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2', true);
    		wp_enqueue_script('jquery');
    
    		// load a JS file from my theme: js/theme.js
    		wp_enqueue_script('my_script', get_bloginfo('template_url') . '/js/theme.js', array('jquery'), '1.0', true);
    	}
    }
    add_action('init', 'my_init');

    3) CSS – do I simply append the css from the script to my style.css file?
    yes. create a css file in your script folder specific to the script and reference it accordingly
    I reference my style sheet via import from my global stylesheet
    @import url('../jscript/css/style.css');

    5) How do I incorporate the html?
    Directly into the page or where you are needing the script.

    Resource: http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/

    Moderator Note: Please note that it is never a good idea to deregister jquery as it can break core WordPress or plugin(s)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Someone PLEASE help me with adding a jquery script to WordPress’ is closed to new replies.