Fix Ajax Button Link
Budget: £10 – £20 GBP
I have a site which is php pages with mostly html and some vanilla javascript. I have this script which loads content into the <main> tag:
$(document).ready(function(){
$('#loader').fadeOut('fast');
var trigger = $('.navItems a'),
container = $('#content'),
loader = $('#loader');
trigger.on('click', function(){
window.scrollTo(0, 0);
var $this = $(this);
target = $this.data('target');
container.load(target + '.php');
return false;
});
});
All the links work across the site, except for the call to action at the bottom of the page. Can you help?
$(document).ready(function(){
$('#loader').fadeOut('fast');
var trigger = $('.navItems a'),
container = $('#content'),
loader = $('#loader');
trigger.on('click', function(){
window.scrollTo(0, 0);
var $this = $(this);
target = $this.data('target');
container.load(target + '.php');
return false;
});
});
All the links work across the site, except for the call to action at the bottom of the page. Can you help?