treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Ghost java script codes!

  • i wanted to enter some javaScript on my theme register.php file but by surprise after some save of my code and running and testing.. when i deleted my jQuary code i can still see the result!! you dont believe if i say i restart my PC several times but i still can see working of my Jquary codes that i deleted so far!! how can i get rid of that?! :( and again by suprise i use these codes in another wordpress site in my easyphp server but nothing happened!!

    PS1: my Jquary code are:

    $('.wordpressusername').bind('keypress keydown keyup', function(e) { $(".buddypresspassword").val( $(this).val()); });

    PS2: i entered these code to function.php file for working with javascript in wordpress:

    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');

  • did you clear your cache?