Skip to content

Instantly share code, notes, and snippets.

@xafarali
Created June 9, 2013 21:44
Show Gist options
  • Save xafarali/5745388 to your computer and use it in GitHub Desktop.
Save xafarali/5745388 to your computer and use it in GitHub Desktop.
Register , Enqueue & Dequeue Scripts and Styles
// Enqueue Styles
function load_styles() {
wp_enqueue_style('AD-Gallery', $this->plugin_url . 'css/ad-gallery.css', false, '', 'screen');
wp_enqueue_style('jScrollPane', $this->plugin_url . 'css/jScrollPane.css', false, '', 'screen');
}
// Enqueue Scripts
function load_scripts() {
wp_enqueue_script('easing', $this->plugin_url . 'jquery.easing.1.2.js', array('jquery'), '1.2');
wp_enqueue_script('Ad-Gallery', $this->plugin_url . 'jquery.ad-gallery.js', array('jquery'), 'ad-gallery');
wp_enqueue_script('timers', $this->plugin_url . 'jquery.timers-1.1.2.js', array('jquery'), '1.1.2');
wp_enqueue_script('jScrollpane', $this->plugin_url . 'jScrollPane.js', array('jquery'), 'jScrollPane');
}
// Register and Unregister
wp_deregister_script('jquery');
wp_register_script('jquery', ("script/jquery-1.7.1_min.js"), false, '1.7.1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment