Wednesday, 18 September 2013

Make ajax call a new jquery version

Make ajax call a new jquery version

I'm tying to have an ajax call to load an external website content in a
div. This content has for example an image slider or an email form that
works with jquery too. Is it possible to have another jquery script loaded
when clicking "Home" together with the content? Home
<script>jQuery(document).ready(function($) {$('.home').on('click',
function() {
var href = $(this).attr('href');
if ($('#ajax').is(':visible')) {
$('#ajax').css({ display:'block' }).animate({ height:'0' }).empty();
}
$('#ajax').css({ display:'block' }).animate({ height:'200px' },function() {
$('#loader').css({ border:'none', position:'relative', top:'24px',
left:'48px', boxShadow:'none' });
$('#ajax').load('home.php ' + href, function() {
$('#ajax').hide().fadeIn('slow').colorFade({ 'fadeColor':
'#0e0e0e' }); }); }); }); });
I tried to implement the scripts on the main page and on the external
page, but it just won't work. Many thanks in advance!

No comments:

Post a Comment