The problem with your code is, as we found out in the comments on the question, that you’re using $
, which is either undefined or has a conflict (in any case, it’s not pointing to jQuery
).
Using jQuery( document )
instead of $( document )
should do the trick!
Related Posts:
- How to: JQuery multiple wordpress media uploader buttons in the same options page?
- Would to use AJAX to get an option from the database and use it in a jquery setup or is there an alternative to consider?
- pass object/JSON to wp_localize_script
- WordPress API Menu/Submenu Order
- What are the advantages and disadvantages of Option Tree over the Customization API?
- How do I add settings to the Background Options Page?
- How To Add New Option Types To Option Tree?
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- What WP folder can I use to write files to?
- WordPress Settings API error
- Add a dropdown to theme customizer
- Understanding wp_add_inline_style
- Add a new checkbox in theme options
- How to add Color Picker in Theme Options for the following?
- Setting multiple default background images?
- Best practice way to implement custom sections into a WordPress theme
- Best practice (forward compatibility) for theme options
- How to alter the text of the post “Excerpt” box label in WordPress post editor?
- How to set the default value of a option in a theme?
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- Where is default wp_head() implemented?
- Add a preview to a WordPress Control Panel
- WordPress settings API error when checkbox unchecked
- How to deploy a new theme/theme options from staging to production site
- WordPress Customizer Typography: How to load just the unique Google Fonts?
- What is the best way to export and import theme options?
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- esc_url not working within add_settings_field callback
- How to Change CSS Variable value in Theme Customizer Live Preview
- How to remove menus section from WordPress theme customizer
- WordPress Google Maps in Custom Theme
- WordPress Errors in generated by theme check plugin [closed]
- WordPress Theme customisation CSS
- Select front page and blog page in custom theme settings page
- wp_enqueue_script being ignored in custom theme
- Getting jquery to work with custom theme
- Using the theme options to change background
- Cannot update WordPress General Settings Site Title and Tagline
- Theme Options page not showing up in admin menu
- How to hook CSS file according to theme selection in the customizer section
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Change setting name in Customizer and keep the data
- Is there a way to activate different theme for specified users? [closed]
- Adding wp_enqueue_media(); causes problem
- How to correctly add JQuery in a WP theme?
- after_setup_theme, Global Variable and Theme Customizer
- Toggle Sidebar Display
- Is there an action for save_menu and/or update_menu?
- Including Javascript options
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- Fancy-box Esay wordpress plugin fails to work on Multilingual site
- For best DB performance should I serialize all theme options together or by type?
- Set multiple templates per post
- Creating Theme Options Page
- Location of theme options page menu icon
- WordPress add options to theme not displaying
- qTranslate with my own theme and settings
- WP 3.1 upgrade breaks AutoFocus+ theme
- Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]
- Difficulty loading jQuery with wp_enqueue_script
- jQuery not available to other scripts
- Access theme options in templates
- My javascript jquery won’t work?
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Can I have two different theme for two different language?
- Using an if statement in the theme customizer page
- How to add “Template” option in page attributes panel?
- How would you accomplish the following advanced settings page?
- Implementing FancyBox
- Single Page Design, Storing in Theme Options
- How can I make my options in an array and store theme in WP options one DB row?
- How to show custom meta_key in each li of menu
- Following Web Performance Optimization techniques to output static and dynamic css
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How to enqueue javascript for WP Customize options sidebar?
- How do i place same widgets multiple time by default on theme activation?
- Post thumbnail to append post content via ajax click event
- Is it possible to save more than one image to an option?
- correct tags for validating input types
- Common single page template options
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Efficiency of wp_options vs a new table
- How to support letting users add their OWN logo to a custom theme?
- Using page-id-{ID} from body_class() in local dev, versus live staging
- My jQuery is enqueued properly. So why isn’t it working?
- Custom theme, contact form 7 & fast secure form doesn’t work
- Change WordPress header color using customizer
- How do I use a color from theme options?
- How can I change the theme of different posts using a plugin?
- How to Create custom xml file for demo content for custom theme?
- Javascipt issue on custom theme
- get_template_part() doesn’t work
- JQuery undefined and Stylesheet loads in bottom along with js files
- Consequences if using PHP include TEMPLATEPATH?
- Weirdness in jQuery supplied with WordPress
- WP_editor doesnt apply wpautop on single line content
- Copying the theme style files and images to duplicate the website but with a difference
- Check if( selected() )
- Alignment Problem [closed]