Load jQuery in Wordpress
Load jQuery in Wordpress
Hi, im working in a project with wordpress, and my theme have a lot of
javascript effects (tooltips, and other ajax features).
The problem is:
im using this script, which one i use a lot in website, because the
effect is really nice, but now when i tried to use with my theme,
works perfect but when load the page i wanna see, all the javascript
and ajax features stop working,
Please if someone can help me to fix this problem.
Problem: when i click a link on the menu to load a new page, the
effect and transition fadeOut and fadeIn works perfect, but when the
page finish load, all the javascript and ajax features stop working.
$(document).ready(function() {
var hash = window.location.hash.substr(1);
var href = $('#lavaLampVariableImage li a').each(function(){
var href = $(this).attr('href');
if(hash==href.substr(0,href.length-5)){
var toLoad = hash+'.html #left-div';
$('#left-div').load(toLoad)
}
});
$('#lavaLampVariableImage li a').click(function(){
var toLoad = $(this).attr('href')+' #left-div';
$('#left-div').fadeOut('slow',loadContent);
function loadContent() {
$('#left-div').load(toLoad,'slow',showNewContent())
}
function showNewContent() {
$('#left-div').fadeIn('slow');
}
return false;
});
});
Thanks!