use this:
var j = jQuery.noConflict();
now everywhere in script JQurey is needed use j
instead of $
or JQuery
also your enqueue line should be like this:
wp_register_script('myjs',get_stylesheet_directory_uri().'/js/my_script.js',array('jquery'),false,true);
wp_enqueue_script('myjs');
you can read more here
P.S: so your updated code should be :
mycustom.js
var j = jQuery.noConflict();//this line Must be first line of script
j(document).ready(function(){
j('.flex-active-slide').append('<div class="playoverlay"></div>');
});
functions.php //NOt header.php
<?php wp_register_script('myjs',get_stylesheet_directory_uri().'/mycustom.js',array('jquery'),false,true);
wp_enqueue_script('myjs') ?>
Related Posts:
- jQuery $(this) keyword
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Disable button in jQuery
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- $.ajax – dataType
- How can I get the ID of an element using jQuery?
- How do you select a particular option in a SELECT element in jQuery?
- How to use jQuery qTip?
- Installing jQuery?
- Email validation using jQuery
- Wildcards in jQuery selectors
- jQuery: How can I create a simple overlay?
- XML Parsing Error: not well-formed in FireFox but good in Chrome
- jQuery get value of selected radio button
- How to make Bootstrap carousel slider use mobile left/right swipe
- javascript function wait until another function to finish
- Clear form fields with jQuery
- How to use radio on change event?
- Adding a page loader using jQuery
- How can I change the text color with jQuery?
- How to get mouse position in jQuery without mouse-events?
- Show div #id on click with jQuery
- How can I change CSS display none or block property using jQuery?
- Is there a way to enable Cross-Origin Resource Sharing for WordPress’ ajaxurl?
- How to get attachment id as soon as it is uploaded through media uploader in jquery?
- Using ‘$’ instead of ‘jQuery’ in WordPress
- AJAX call returns 0
- Automatically decrease font size for long words
- Is it possible to get the logged in username in a jquery script?
- Gravity Forms loading jquery
- Extend 3.5 media uploader plugin to change button name
- Any good lightbox-like option that works in WP 3.2.1?
- Javascript included but alert() function not working
- Adding fields to the media uploader with jquery listeners
- Bind to WPSetAsThumbnail
- How do I activate jQuery/script on demand?
- How to delete post attachments when jQuery is used with a click event on the delete link
- Ajax pagination works only first and third time
- Using multiple versions of jQuery while still calling it like WP likes
- adding google event tracking to links in posts
- how can I make $ work in wordpress for jQuery?
- WordPress Jquery Fade in, Fade out effect
- Override default jquery ui library with newer version
- Can I make simple global tooltips in WordPress?
- WordPress Jquery Confliction with Plugin
- Periodically getting jQuery “…. is not a function” errors [closed]
- Gutenberg Filtering Metaboxes by Post Format
- Unwanted content in website title
- HTML editor accessing quicktag buttons
- Error when posting comment form: The error is TypeError: e[h] is not a function
- How to use datepicker.min.js?
- Using Javascript to detect keypress event in text editor
- videopress videos are not displayed when loading the content with ajax in a lightbox
- Bypass nonce value while trashing a post
- How to enqueue jquery in admin and why is it not already there?
- Call a javascript function from another file
- Adding JS to one page
- Set TRUE or FALSE based on a wp_localize_script option value
- Display posts from another site using REST API in an asynchronous manner
- Simplest ajax form not working when it should
- How do I include javascript/jquery image resizing with wordpress?
- Changing WordPress URL breaks some jquery functions
- Extend the twentyten dropdown menu with jQuery with a delay onmouseout
- Loading a newer version of jQuery within WordPress
- WordPress 3.1 makes my drop down menu dissapear, jquery dont work
- Notice-Updated div moving around unprompted
- How to display comments length
- Adding JavaScript file in Admin Panel
- How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?
- Can’t execute jQuery before my script
- Admin Ajax is returning 0 and not Insert data
- Multiple Media uploader output to input
- Can’t add classes using jQuery from a JSON string with get_body_class()
- Using WP functions inside javascript
- How to add external remote JS source to Gravity Forms?
- Why is ajax working on one server and not the next?
- Connect Agile Carousel to WordPress AJAX
- How to add shortcode to show/hide press releases?
- Calling multiple scripts using wp_enqueue_script
- jQuery forms & updating info
- wordpress file upload from direct directory not working
- How to use script in WordPress installation?
- Defer Parsing of Scripts
- JavaScript code do not works on online server
- Enqueue script, taking no effect [closed]
- How to add jQuery script?
- Displaying contents of a tab
- In the Edit Post page how do I modify with jQuery the status select list?
- Variable not being returned from Ajax Javascript (though javascript receives it)
- Append jquery script for each [partners] shortcode with specified values
- Infinite scroll page number [duplicate]
- Thumbnail remove width & height function
- Change jQuery(document).ready to $.delegate in wordpress
- How to install Lavalamp jQuery effect in wordpress [duplicate]
- How to Run a jQuery Script after a Javascript Script has Finished in WordPress
- Using jQuery to override the content of a div [closed]
- Hook with jquery script is not working in wp-admin [closed]
- jQuery functions work in console, but not live
- Uncaught TypeError: number is not a function [closed]
- Cannot get jQuery to work in WordPress [duplicate]