Yes, I have wp_head() and wp_footer().
I tried
jQuery.noConflict();
$(window).load(function () {
alert("s");
}
and
jQuery.noConflict();
jQuery(window).load(function () {
alert("s");
}
I also tried deleting every unnecessary code in functions.php or in the head tag
It worked with
jQuery(document).ready(function($) {
hm I still don’t know when to use a $, when to use jquery and when to use a $ in function($).
Another Question:
Can’t I use
jQuery(window).load(function($) { ?
I’ve got problems with Google Chrome when reloading with F5 if I use document-ready instead of window-load
Have you checked the footer of your page with code inspector or firebug to see if the script is outputted correctly? Because right now you don’t really know if it’s something wrong with outputting scripts or with script syntax itself.
EDIT: Also, what browser are you using to test this?
Everything works now.
I use
jQuery(window).load(function() {
thanks a lot to everyone
LovelessDesign said
Everything works now.
I use
jQuery(window).load(function() {
thanks a lot to everyone
Adding:
$ = jQuery.noConflict();
at the top of the scripts file will solve all your problems(if the problem is js like yours). Then you’ll be able to use the $ variable without any problems…
RubenBristian said
LovelessDesign said
Everything works now.
I use
jQuery(window).load(function() {
thanks a lot to everyone
Adding:
$ = jQuery.noConflict();
at the top of the scripts file will solve all your problems(if the problem is js like yours). Then you’ll be able to use the $ variable without any problems…
thank you. you were absolutely right