You can wrap your javascript inside a self-invoking function, then pass jQuery
as an argument to it, using $
as the local variable name. For example:
(function($) {
$(document).ready(function(){
$("ul.vimeo_desc_feed li a").click(function(){
alert($(this).attr('href'));
return false;
})
});
}(jQuery));
should work as intended.
If I remember correctly the WP-supplied version of jQuery (the one you get if you wp_enqueue_script('jquery')
) puts jQuery in no-conflict immediately, causing $
to be undefined.
Related Posts:
- How to set time delay in javascript
- Disable button in jQuery
- JavaScript: filter() for Objects
- jQuery date formatting
- How to center image in carousel
- Enable & Disable a Div and its elements in Javascript
- Which selector do I need to select an option by its text?
- How to pass $(this) properly in click jQuery function
- How to remove specific value from array using jQuery
- Check if inputs are empty using jQuery
- how to remove default jquery and add js in footer?
- CSS not pulling in for jQuery UI dialog
- Check if jquery library exist
- Loading style.css and Jquery using HTTPS
- Access Customizer’s DOM – jQuery
- Media manager multiple selection
- Uncaught TypeError: Cannot read property ‘replace’ of undefined
- Is it worth updating WP admin to jQuery 1.5?
- How to include jQuery properly?
- Ajax not firing properly using Firefox, but works in Chrome
- How to load whole WordPress pages dynamically with AJAX/jQuery like this following website?
- Adding jQuery dependency prevents my script from enqueuing/loading
- Creating custom AJAX requests
- How to pass jQuery ajax URL value
- trigger(‘change’) not working
- how to get the comment ID in the front end when the REPLY button is clicked?
- Gravity Forms not loading under https, jQuery is not defined
- Gravity list field override and adding javascript [closed]
- Change header image loaded by jQuery to use HTTPS
- Admin wp_ajax hook returning 0
- Automatic jQuery accordion from header tags
- Need To Deregister Scripts Via Functions.Php
- Add a Fancybox automatically to post type “post” images
- Uncaught TypeError: jQuery is not a function
- WordPress customizer refresh screen after save
- Creating multiple enclosing shortcodes and fixing JS issues on click
- How to undo deregister script and use local versions?
- Can’t load a class into WordPress post editor’s content field
- Include jQuery plugin in WordPress
- Hide metabox dependant on page template chosen
- Trying to remove duplicate jquery scripts
- How to make an WordPress element sticky? [closed]
- Frontend Post with JQuery AJAX to Php Issue
- show/hide div with simple jQuery script [closed]
- How do I remove WordPress Custom Menus hover event and replace it with jQuery onclick?
- How to get all users by custom current user meta (array)?
- wp_dequeue_script not working in my plugin
- Trouble adding inline style after jQuery in the footer!
- jQuery script isn’t posting to database
- $.browser Undefined Seemingly Causing Faulty Page Display
- I’m trying to set the cookie to my site to button on click action ,it is working on when user logged in .When user logged out it’s not working
- Invoking Jquery in a Plugin
- Loading scripts on a single page plants the script in the footer
- registering new jQuery after wp_deregister_script() not working
- Displaying an image’s alt title and caption inside a fancybox window. Working, but showing the same alt and caption for each image
- jQuery Show DIV and Remove Button [closed]
- timeouts (ERR_CONNECTION_RESET) on seemingly random files after upgrading to HTTPS
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- Need workaround for insecure XMLHttpRequest endpoint request
- jQuery plugin not loading
- Flexslider won’t work with WordPress’ jQuery | Dependencies
- Applying jquery to WordPress admin edit.php
- Load different post_thumbnail for smaller window width (jQuery,WordPress)
- Duplicate “default” form with jQuery
- Search query with Ajax
- admin ajax php success returns 0
- Selecting multiple options onclick
- my example with ajax doesn’t work
- Best way to add some custom javascript using jquery to a child theme
- Submitting form from input[type=file] dialog box
- jQuery works in console but not when in a file
- Cannot remove error “Conflict with another plugin which overwrites jQuery” from wordpress site
- WordPress not showing jQuery
- wp_deregister_script(‘jquery’) not working
- Loop through WordPress API response errors
- How Do I change Markup of a link in WordPress
- How can publish my bootstrap created table ( huge amount of data) on my word-press theme?
- My website frequently redirect to a different advertisement URL
- Javascript when Customizer preview is ready/refreshed?
- Lightbox scroll page down on iPhone
- Multiple recaptcha validation
- Update a parent theme JQuery property in the child theme
- jQuery search function not running in WordPress but running locally (fiddle)
- Refresh widget admin page resetting jQuery hidden class
- Autocomplete for titles via ajax – rework of past post away from like_escape()
- Can’t seem to get JQuery working (wordpress plugin)
- Ajax Request with jQuery not happening
- Console shows ReferenceError: jQuery is not defined, no clue why!
- slide change on hover with nextgen scrollgallery [closed]
- Sorting UL Listing Within the TinyMCE Visual Editor in WordPress
- jQuery .change() Event Bubbling in WP Admin
- My .js file is getting a 404
- Unable to understand this jquery code [closed]
- Combo box populating a DIV using ajax/jquery
- how to display post in jquery slider and carousel
- Carousel Hover Image
- How to Add jQuery cod in wordpress [duplicate]
- can’t make jQuery work (change image on time interval) [closed]
- jQuery datepicker not showing on admin menu
- Can’t seem to check off a category checkbox with jquery?