I'm currently trying to get bPopup (http://dinbror.dk/blog/bPopup/) to work on my page. I've found this jsFiddle (http://jsfiddle.net/24A9b/) which shows to get the script to work. Using following code: ;(function($) {
// DOM Ready
$(function() {
// Binding a click event
// From jQuery v.1.7.0 use .on() instead of .bind()
$('#my-button').bind('click', function(e) {
// Prevents the default action to be triggered.
e.preventDefault();
// Triggering bPopup when click event is fired
$('#element_to_pop_up').bPopup();
});
});
})(jQuery);
But i want to get a little more fancy. On this page (http://dinbror.dk/bpopup/) is several customization elements described. The problem is that i can't write javascripts and jQuery so i have no clue of how to i.e. add a transition to the script.
Hope somebody can guide me.
Marius
You do not need to write anything.
See the transition effect you want and so change this line:
To (for instance):
You need only to include the two libraries:
A simple snippet: