There is a difference with the version of jQuery supplied with WordPress as outline on the Codex page for wp_enqueue_script
:
Note: The jQuery library included with WordPress loads in “no conflict” mode. This is to prevent compatibility problems with other javascript libraries that WordPress can load.
Change your script to reference the jQuery object with jQuery
rather than $
, passing the jQuery object as $
so you can use it as you normally would within:
jQuery(document).ready(function($) {
$('#something').html('something');
});
Related Posts:
- pass object/JSON to wp_localize_script
- How to alter the text of the post “Excerpt” box label in WordPress post editor?
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- How to Change CSS Variable value in Theme Customizer Live Preview
- WordPress Google Maps in Custom Theme
- wp_enqueue_script being ignored in custom theme
- Getting jquery to work with custom theme
- Adding wp_enqueue_media(); causes problem
- How to correctly add JQuery in a WP theme?
- Toggle Sidebar Display
- Including Javascript options
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- Fancy-box Esay wordpress plugin fails to work on Multilingual site
- WP 3.1 upgrade breaks AutoFocus+ theme
- Difficulty loading jQuery with wp_enqueue_script
- jQuery not available to other scripts
- My javascript jquery won’t work?
- Implementing FancyBox
- How to: JQuery multiple wordpress media uploader buttons in the same options page?
- Post thumbnail to append post content via ajax click event
- 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?
- 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
- Javascipt issue on custom theme
- How to make javascript work on theme options page
- JQuery undefined and Stylesheet loads in bottom along with js files
- jQuery from parent theme loaded with many other scripts in a single min.js file
- Trouble in enquing all js files under certain directory
- How do I implement jPanelMenu?
- loading javascript after jquery is loaded
- MapPress Easy Google Map in Jquery Tabs Problem
- I don’t think WordPress is loading jquery or bootstrap js
- how can i remove js file from my footer in wordpress
- How to properly use AWS SES for a contact form?
- Embedding CodePen Calorie Script – jquery error
- How to load jQuery with Ajax in WP version 5.3.2?
- How to enqueue scripts properly with ES6 webpack?
- Infinite scroll without plugin using ajax
- change background image on scroll
- how to add jquery to wordpress
- jQuery conflict in WordPress, works fine in HTML
- How would I get this to work – send to post from thick box
- FitVid not working for iframes on particular theme install
- Enable WP to accept standard jQuery code embeding between the tags [duplicate]
- WordPress custom jquery not found
- Passing a location-dependent array via wp_localize_script within a shortcode
- enqueue script if page is not equal to
- Set start page depending on screen width [closed]
- WordPress Subpages Fancybox Trouble
- Theme now uses require.js and enqueue script no longer works
- can’t add EVENT LISTENER to a element
- jQuery Snippet Not Working on WordPress Site [closed]
- WP Customizer get control value on change
- Execute javscript when theme customizer loads (autosave issue)
- WordPress Includes mejs 404 error
- Change admin bar to default:off
- Template for individual post designs
- The seventh parameter passed to add_submenu_page()
- What would happen if the admin installs a plugin when the plugin is included in the theme?
- How do I get my child-theme to work with my theme’s includes folder?
- wp_insert_post breaks rewrite rules
- Template Hierarchy for get_header()
- Remove frameborder attribute from iframes
- how do I get a sidebar’s id or number for use with is_active_sidebar()
- Looking for the code in twentyten that allows users to select images for the header/banner
- How to determine which custom header image is being shown
- using wordpress without javascript
- Theme Check: Could not find post_class
- can’t understand _e function well
- How to make theme elements customizable in wordpress?
- How to obtain a reference to the_excerpt() from custom loop
- defining a folder location in order to recall it
- JavaScript stops working on selectively refreshed sections one inside the other
- Why doesn’t my css work when I check my theme on mobile devices? [closed]
- Custom Blocks as part of a theme
- How to set up diffrent mobile theme for single site in WordPress?
- Enqueued JavaScript is not working
- How to code custom special page
- Is it possible to set a variable for get_post_meta?
- Remove h1 from 2015 theme
- Only the latest post shows up on post page?
- WordPress pulling in random page themes
- Can’t change theme name
- Stop WordPress from showing images on non post pages
- enqueuing external and internal js and css in wordpress did not work with owl.js animate.css
- Problem with pagination link (error 404)
- WordPress wp_get_current_user returning blank values until refresh
- use a single nonce in three different nonce field
- Theme is Enqueueing Everything in Footer
- Local theme changes upload on server but theme changes not showing
- wp_kses allow checkbox class and checked
- Understanding WordPress theme files and underscores
- New theme HTML5 Support for Search in WordPress 4.4
- Use external fonts in WordPress stylesheet
- Custom link color or stylesheets
- What is the advantage of using home.php over index.php for the front page
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]