javascript - Removing/Showing Elements -


i'm trying create site 3 images, clicked on, toggle 3 different divs/elements. want each click-able image show element, whilst removing elements shown.

so image1 show div1, image2 show div2, image3 show div3. elements before have literally removed, not hidden sight.

if possible, there way save option when lasts visits site cookies?

here's quick solution using jquery: http://jsfiddle.net/jonigiuro/45hkg/

$('.image').on('click', function(e) {     $('.box').addclass('hidden');     var imagenumber = $(this).attr('id').replace('image','');     $('#div'+ imagenumber).removeclass('hidden'); }); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -