jquery show/hide multiple div toggle -
first of taking time me this.
sorry english ;-)
well give link project more easier understand problem
as can see on right side, have social panels.
i wanted jquery open panel each 1 (with last feeds). after reading posts here able make working ( not @ jquery). still have problem.
as can notice when click on button (facebook, youtube...) panels switch off/on etc.. button stay in active position. don't come @ normal position. think due toggle problem
code:
$(".link1").click(function(){ $("#twittercontent, #youtubehome").hide(); $("#pz_fbplugin").toggle("fast"); $(this).toggleclass("active"); return false; $(".link2, .link3").removeclass('active'); $(".link1").addclass("active"); }); $(".link2").click(function(){ $("#pz_fbplugin, #youtubehome").hide(); $("#twittercontent").toggle("fast"); $(this).toggleclass("active"); return false; $(".link1, .link3").removeclass("active"); $(".link2").addclass("active"); }); $(".link3").click(function(){ $("#pz_fbplugin, #twittercontent").hide(); $("#youtubehome").toggle("fast"); $(this).toggleclass("active"); return false; $(".link1, .link2").removeclass("active"); $(".link3").addclass("active"); }); css:
a.facebook {width: 46px;position: fixed; right:0; height: 130px; top: 175px; margin-right: 0; background: url("socialrudyfacebook.png")no-repeat; z-index:51} a.facebook:hover{width: 129px} a.active.facebook{width: 129px} a.twitter{width: 46px; position: fixed; height: 130px;right: 0; top: 317px; margin-right: 0;z-index: 51;background: url("socialrudytwitter.png")no-repeat; a-index:51} a.twitter:hover{ width: 129px} a.active.twitter{ width: 129px} a.youtube{width: 46px;position: fixed; height: 130px; right: 0; top: 457px ;z-index: 150; background: url("socialrudyyoutube")no-repeat; a-index:51} a.youtube:hover{ width: 129px} a.active.youtube{ width: 129px} hope it's enaugh me this.
i think problem return false. if remove or move down, should work. instead of return can use:
$(".link3").click(function(e){ e.preventdefault(); // function , stuff });
Comments
Post a Comment