Javascript included but alert() function not working

A few things: The version of jQuery that ships with WordPress is run in noConflict() mode. Meaning you have to use jQuery instead of $ when you make your first reference. Don’t register your own version of jQuery when you’re developing. You’re locking yourself in to a single version that may or may not be … Read more

WordPress and jQuery [closed]

jQuery.noConflict() jQuery is included in WordPress in noConflict mode, so as to work with other javascript extensions that also use $ as an alias. Hence your above Version II will not work with the WP native jQuery loading. What is jQuery? jQuery is not a language. It is nothing but a (massive) javascript object. That … Read more

jquery UI in wordpress admin

This is what I include in my calendar plugin: // Alternative solution for loading scripts only in plugin page if( (is_admin() ) && (isset($_GET[‘page’]))) { // Register scripts and styles add_action(‘admin_init’, ‘wp_eventcal_init’); } function wp_eventcal_init() { // Only load these scripts in Admin wp_deregister_script(‘jquery-ui-core’); wp_register_script(‘jquery-ui’,’http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js’,array(‘jquery’)); wp_enqueue_script(‘ui-datepicker’, plugins_url(‘js/jquery.ui.datepicker.min.js’,__FILE__)); wp_enqueue_script(‘ui-timepicker’, plugins_url(‘js/jquery.timepicker.js’,__FILE__)); wp_enqueue_script(‘wp-calendar’, plugins_url(‘js/wp-eventcal.js’,__FILE__)); wp_enqueue_style(‘event_cal_css’, plugins_url(‘styles/eventcal.css’,__FILE__)); } Then … Read more