I used this tutorial to hid/show DIVs. Unfortunately for some reason it’s no longer working (I modified a few things in my code in the meantime)… Do you see where the issue come from? jsfiddle: http://jsfiddle.net/Grek/C8B8g/
I think there’s probably a conflict btw the 2 scripts below:
function showonlyone(thechosenone) {
$('.textzone').each(function(index) {
if ($(this).attr("id") == thechosenone) {
$(this).show(200);
}
else {
$(this).hide(200);
}
});
}
$('.activity-title a').click(function(){
$('.textzone').fadeOut(2000);
var region = $(this).attr('data-region');
$('#' + region).fadeIn(2000);
})
You have a few problems going on. You’re missing
data-sourceon your<a>elements. Their “region-source” is hidden inside of the href with some function. I removed that put it intodata-sourceand now it all works fine.You want to do something like this:
jsFiddle DEMO