We had this same question last week, a script to use the left and right keys to navigate pages.
This was the solution, it will depend on what you are trying to do, and if there are no clashes with existing scripts.
WordPress does not like the $(document).ready(function ()
, so you wrap it in a file, function like this, then call the file in functions.php
(function($){ 'simple script goes here' })(jQuery);
HTH
David
Thread Starter
fl0w85
(@fl0w85)
Hello, thanks for reply. i have script like this
<script type="text/javascript">
$.noConflict();
jQuery(function($) {
$(document).ready(function(){
$('.demo6').jrumble({
speed: 50
});
$('.demo6').hover(function(){
$j(this).trigger('startRumble');
}, function(){
$(this).trigger('stopRumble');
});
});
});
</script>
and it loads
<script src="<?php bloginfo('template_directory');?>/js/jquery.jrumble.1.2.min.js" type="text/javascript"></script>
and script work on html but no on WP