...

View Full Version : jQuery 'or' in jQuery?



TomBower
12-19-2010, 01:05 PM
Sorry for the second thread today but;


$ ('#navbar a') .click(function() {
var page = $(this).attr('href');

$('#main').load(page);

return false;

});

You see
$ ('#navbar a'), how could you make it so it's like #navbar a or #login a? (ie. both div's can change the #main div?

Thanks!

DanInMa
12-20-2010, 04:26 AM
$ ('#navbar a,#login a') .click(function() {
var page = $(this).attr('href');

$('#main').load(page);

return false;

});



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum