I am using this script to load most of the pages in #content. I was wondering how should I go about enabling and disabling certain links from being affected. The problem is, on some pages I want the script to affect my main menu links completely, and on others, I want it to affect my menu partially so that I can load other pages and sub-domains.
$(document).ready(function() {
$('#content').load('login.php')
$(document).on('click','a',function() {
var page = $(this).attr('href');
$('#content').load('' + page + '.php')
return false;
});
});
So should I simply work with $(document).on('click','a',function() {? to handle this? Is there a way to use a class tag to disable links from being affected? Or perhaps a better way to go about this? Thanks.