Hi folks, propb. very simple, but not for me. Looking to pass a variable on a click function to show either div a or div b based on the a link clicked. My code is something like this
$('.view').click(function() {
var id = this.id.replace('view_', "");
if(id=1) { $('#show').show('slow'); }
if(id=2 ) { $('#show2').show('slow'); }
$('#categories').hide('slow');
return false;
});
});
But OBVIOUSLY the if statements are wrong - I know that I am just using them as an example. Any suggerstions? Thanks in adavance