jquery - Multiple div popups on one page -
jquery - Multiple div popups on one page -
i want utilize multiple div popups on 1 page. used else's jsfiddle create work 1 popup, making work multiple popups whole other story.
i have adjusted jsfiddle singular popup in many ways accomplish multiple popups, javascript knowlegde still not good.
what want following: have 6 content blocks on page each 'read more' button open popup content block resulting in more text in popup. each content block has own 'extra content' hidden in div. when click on button belongs 1 of 6 block content open in popup. when click on button block particular content needs pop up.
i have come far jsfiddle: http://jsfiddle.net/wgphg/1122/
and hereby code (so far):
function openpopup('div1') { $('#div1').fadein(200); $('#div2').hide; } function openpopup('div2') { $('#div2').fadein(200); $('#div1').hide; } function closepopup() { $('.popup').fadeout(300); }
can help me out?
thanks lot!
just rewrote function declarations , fixed syntax errors, in case have question solution, sense free ask.
function openpopup(el) { $('.popup').hide(); $('#' + el).fadein(200); } function closepopup() { $('.popup').fadeout(300); }
jsfiddle: http://jsfiddle.net/jkurcik/wgphg/1124/
jquery popup
Comments
Post a Comment