I'm trying to implement jquery-bubble-popup on my site however I'm completely stuck. I'm trying to do the following.
- If somebody clicks on a "report info" div a bubble pop up will show up pertaining to that report.
- I want to be able to change things around in the popup and click submit which will post that data to that server.
- If one clicks outside of the popup. I want it to simply close.
Pretty simple setup but I'm pulling my hair. Can't get the popup to close without it going haywire.
Fiddle: http://jsfiddle.net/rECnm/1/
jQueryBubblePopup: http://www.maxvergelli.com/jquery-bubble-popup
Code:
$(document).ready(function () {
$('div.emailReportIcon').CreateBubblePopup({
manageMouseEvents: false
});
$('div.emailReportIcon').click(function (event) {
var button = $(this);
var email = button.attr("data-email");
var message = '<div style="padding:10px;width: 250px;"><p><input type="checkbox"> Email me when new reports are ready.</p>' + '<p>Email Address<br /><input type="text" value="' + email + '"></p>' + '<div >' + '<input type="image" name="submit" value="submit" class="submitButton">' + '</div></div>';
button.ShowBubblePopup({
manageMouseEvents: false,
position: 'bottom',
align: 'left',
tail: {
align: 'left'
},
innerHtml: message,
innerHtmlStyle: {
color: '#000',
'text-align': 'left'
},
themePath: 'http://www.maxvergelli.com/docs/jquery-bubble-popup-examples/images/jquerybubblepopup-themes',
alwaysVisible: false,
closingDelay: 200,
selectable: true
});
});
});