WordPress.org

Ready to get started?Download WordPress

Forums

Interactive US map with jquery (4 posts)

  1. sponauglebl
    Member
    Posted 9 months ago #

    Hi!

    I'm trying to add a US clickable map on one page only. I know I need to use something like "is_page( about me )" to identify which page but I: 1. do not know where to put such a statement within the functions.php 2. believe I have "called" jquery by putting this string in my functions.php

    function my_init() {
    	if (!is_admin()) {
    		// comment out the next two lines to load the local copy of jQuery
    		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');
    		wp_enqueue_script('jquery');
    	}
    }
    add_action('init', 'my_init');

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    but I do not know if that's correct. 3. I have a zip file I downloaded containing all the JS for the map but now I don't know what file to upload it into via FTP.

    Any help with the above questions, or how to embed a clickable map would be greatly appreciated!

  2. esmi
    Forum Moderator
    Posted 9 months ago #

    Never, ever, de-register core jQuery!

  3. sponauglebl
    Member
    Posted 9 months ago #

    I'm obviously in over my head. I don't even know what that means! How about this: what is the easiest way to add an interactive map to my website on one page? I've searched the internet but I'm still not totally understanding.

    Thank you for your help.

  4. esmi
    Forum Moderator
    Posted 9 months ago #

    Get rid of that complete function and then review http://codex.wordpress.org/Function_Reference/wp_enqueue_script

Reply

You must log in to post.

About this Topic

Tags