Pop up light box

Permalink 1 user found helpful
Hi everyone,

I am in need of displaying a form in Pop up light box when click on a text. I have no idea regarding pop up light box in concrete5. Any help would be appreciable

Thank you
Vijay

SVijay
 
jbx replied on at Permalink Reply
jbx
Easy Vijay - use jQuery :)

create a div with your form in
<div id="myForm"><form>...</form></div>[code]
and a link
[code]<a href="#myForm" title="Display Form">Display Form</a>


and some jQuery
$(document).ready(function() {
  $('a[href=\\#myForm]').click(function() {
    $('#myForm').fadeIn('fast');
    return false;
  });
});


And your form will appear onclick. If you want to stay in the lightbox, you will need to use jQuery to submit the form using ajax and return the response, otherwise, your page will refresh, killing your popup.

You can make the myForm div look and act like a popup using css.

Jon
Tony replied on at Permalink Reply
Tony
there's also a block in the marketplace that solves this problem:

http://www.concrete5.org/marketplace/addons/popup/...
jbx replied on at Permalink Reply
jbx
That's just cheating ;)
SVijay replied on at Permalink Reply
SVijay
Hi there,

Thanks for you responses Jon and Tony,
Let me try it.
SVijay replied on at Permalink Reply
SVijay
Hi Jon,

If we want a light box to show number of images in a div with next and prev button to slide, now for this requirement how can we do light box display?
jbx replied on at Permalink Reply
jbx
Sounds like just a slideshow with lightbox feature - there's loads of these in the market place, or if you wanna custom build your own, then just google for jQuery slideshow lightbox - hundreds of them out there :)

Jon
SVijay replied on at Permalink Reply
SVijay
Hi jon,

Thanks for your response dude.
I will try it.
SVijay replied on at Permalink Best Answer Reply
SVijay
Hi Guys,

Got it from the below link. Check out

http://www.concrete5.org/documentation/how-tos/javascript-jquery-an...