When I use jQuery clix then ajax is not working after when I use jQuery latest version then jQuery clix not work.
<script src="{{asset('build/js/custom.min.js')}}"></script>
<script src="{{asset('js/jquery.dataTables.min.js')}}"></script>
<script src="{{asset('js/jquery-calx-sample-2.2.8.min.js')}}" type="text/javascript"></script>
j query calx actually not work latest jquery.min,js, if you use old less than 2 version that can do work. use this cdn i think solve your problem.
or if you face as like-enter code here jQuery tooltip and popover not load and work
you can try this jquery code:-
$('.hasTooltip').tooltip();
or say more details your actual problem.
Related
my problem is quite annoying and weird. I have created a custom Wordpress theme and in the header.php I was loading jquery like this (can't remember why right now):
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript"> google.load("jquery", "1"); </script>
Last night I replaced the code above with
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
and then my site collapsed. I changed it immediately back again, but the problem persisted. I placed some Jquery in the HTML and it works just fine. Then I disabled my plugins by commenting out code in my functions.php file as below:
<?php
if (!is_admin()) {
wp_register_script('custom', get_stylesheet_directory_uri().'/js/custom.js');
wp_enqueue_script('custom');
wp_register_script('blockui',get_stylesheet_directory_uri().'/js/jquery.blockUI.js');
wp_enqueue_script('blockui');
wp_register_script('fancy',get_stylesheet_directory_uri().'/js/jquery.fancybox.js');
wp_enqueue_script('fancy');
wp_register_script('jeasing',get_stylesheet_directory_uri().'/js/jquery.easing.js');
wp_enqueue_script('jeasing');
wp_register_script('friendchooser',get_stylesheet_directory_uri().'/js/jquery.friendChooser.js');
wp_enqueue_script('friendchooser');
wp_register_script('zclip', get_stylesheet_directory_uri().'/js/jquery.zclip.min.js');
wp_enqueue_script('zclip');
}
?>
Still the problem occurs. Any ideas?
There is syntax error in custom.js file in line 30. Just remove } from there.
And learn some about firebug, it's very helpful :)
I am implementing google chrome extension. I have written the following code for the same.
var callback = document.getElementById('callback');
callback.addEventListener('click', function() {
datepicker({"readonly":true,"changeYear":true,"changeMonth":true,"dateFormat":"yy-mm-dd","numberOfMonths":3,"required":false});
});
but the above code is not working. if anyone know the right way, please suggest me.
As per Arjun's answer:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
it didnt worked, so I down-graded the jquery-1.9.1.js to lower version and it worked like charm. So change your jquery min version, it will start working.
Degrade the jquery.min file to lower version and enjoy. Tested, its working successfully with 1.8 version :)
Hi guys I have been trying to insert a tooltip but I dont know what I am doing wrong..
I am including all the necessary files
<script src="jquery-1.7.2.js"></script>
<script src="jquery.tipTip.js"></script>
<script src="jquery.tipTip.minified.js"></script>
and using this script in the page too
<script language="javascript">
$(function(){
$(".someClass").tipTip();
});
</script>
and this is how I implement it into html
Curabitur dolor eros
what am I doing wrong?
here is the jsfiddle I think
http://jsfiddle.net/jFqFG/
I believe the issue was related to including jQuery twice; once before the plugin was referenced, then once thereafter, thereby nuking the plugin when jQuery was re-initialized.
Removing the second reference to jQuery evidently resolved the issue, as discovered in the comments attached to the question.
There apparently seems to be some kind of a bug when including both jQuery and tiptip files. There is a link here which discusses the same and provides a patch to overcome the same.
I have not tested it . Those who can , please do and provide the results.
My page, that contains a couple of slides functioned perfectly with just js/jquery-1.5.2.min.js.
I recently introduced a top banner to my webpage (www.ug-mart.com) with googles CDN , but the top banner didnt work. I have had to remove js/jquery-1.5.2.min.js for the top banner to work.
Having removed js/jquery-1.5.2.min.js everything that initially worked well now doesn't work. Only the top banner works. It seems like i cant have both and js/jquery-1.5.2.min.js on the same page.
Is there a way to stop the the two jquery libraries from conflicting, and collaborate?
Looking forward to your reply.
SirBT
you can safely use jQuery along with other libraries using .noConflict(). usually, it's a conflict of the use of the $ function name.
i prefer doing jquery in the "closure" method:
(function($){
//i can use "$" safely in here
}(jQuery));
also, if you are using multiple versions of jQuery, then don't. just download the latest and use it. it should still cater some of the old API.
heres a sample code to show how this works:
//lets hijack the "$"
$ = (function() {
return {
libName: "some other library using $"
}
}());
//create a closure for us to use "$"
(function($) {
//we can now use the $ safely in this closure
$('body').text('hello world! in the body!');
//let's check "$" in here
console.log('in here, "$" is jQuery:',$);
}(jQuery));
//let's check "$" out here
console.log('out here, "$" is:', $);
See jQuery's $.noConflict()
Although, you'd really be better off, reestablishing whatever plugin requires older jQuery and make use of new version only.
Does $.noConflict() works?
Import the js/jquery-1.5.2.min.js first and use $.noConflict() to register js/jquery-1.5.2.min.js. Then use another code block and import another version of jQuery. In the end, rewrite the top banner using jQuery.xxx() instead of $.xxx()
I think this should be work.
Replace any one of them as specified:-
Declare in any one of them
$a = jQuery.noConflict();
Replace all $ of that file by $a in that file
the simple answer.
add this at the end of your scripts.
<script src=""></script>
<script src=""></script>
<script type="text/javascript">
$.noConflict(true);
</script>
I've set document.ready in the middle of a page.
It was working fine on local server, on an online production beta server, but failed on the final server.
Any suggestions?
thx
Code:
$(document).ready(function() {
And yes. JQuery is loading and it's working propely
UPDATE: These days I've found the same issue and for futher reference the script tag that includes the jQuery must be propely closed. If not the $(document).ready() is never called.
Wrong:
<script type='text/javascript' src='js/jquery-1.6.2.min.js'/>
Also wrong:
<script type='text/javascript' src='js/jquery-1.6.2.min.js'>
Right:
<script type='text/javascript' src='js/jquery-1.6.2.min.js'></script>
Nowadays using hmtl5 <!DOCTYPE html>
Get Firebug and check:
is jQuery loading or is it missing. And is it loaded before the document.ready ?
is the script throwing any JavaScript-errors?
The most likely problem is the production server doesn't have a copy of jquery. Switching to having google provide jquery for you is a good practice.