Hvem glor – din bror Den ikke-så-personlige blog af Bjørn Klinggaard

14jul/10573

bPopup

24.03.13: New release, bPopup version 0.9.3

bPopup is a learning and exploring jQuery project. It's a lightweight cross browser jQuery popup plugin. It's not creating your popup but doing all the logic as opening, closing, centering on resize & scroll, creating a modal overlay etc. It can open any container you create with all kinds of content. bPopup has been tested in IE67-9, FF2-7, Opera 9-10, Safari 4-5 and Chrome 4-15.

Demo | Download

Contents

  1. How to use bPopup
  2. Options (API)
  3. Changelist
  4. What can you do?
  5. License
  6. Support
  7. Downloads

How to use bpopup

» Click here to see a jsfiddle you can play with! « Basic example that will bind a click event which will trigger bPopup when fired. Add a reference to the jquery core lib (newer than 1.3.x) and bPopup. Please don't hotlink to bPopup:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/x.x.x/jquery.min.js"></script>
    <script src="jquery.bpopup-x.x.x.min.js"></script>

Markup: Add a button + an element to pop up.

    <html>
        <head> ... </head>
        <body>
          ...
            <!-- Button that triggers the popup -->
            <button id="my-button">POP IT UP</button>
            <!-- Element to pop up -->
            <div id="element_to_pop_up">Content of popup</div>
          ...
        </body>
    </html>

CSS: Hide the element you want to pop up on page load.

    #element_to_pop_up { display:none; }

The magic: Bind a click event on the button which will trigger the popup.

    // Semicolon (;) to ensure closing of earlier scripting
    // Encapsulation
    // $ is assigned to jQuery
    ;(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);

Or with custom settings

    ;(function($) {
        $(function() {
            $('#my-button').bind('click', function(e) {
                e.preventDefault();
                $('#element_to_pop_up').bPopup({
                    appendTo: 'form'
                    , zIndex: 2
                    , modalClose: false
                });
            });
         });
     })(jQuery);

Enjoy

Options

API – name [type] (default value)
amsl[int] (50) Above Mean Sea Level. Vertical distance from the middle of the window, + = above, - = under.
appendTo [string] (’body’) Element to append popup (and modal overlay) to. For asp.net sites append to 'form'.
appending [bool] (true) Should the popup append to an element or just open where it is?  Version 0.7.0
closeClass [string] ('b-close') Class to bind the close event to. Version 0.3.3
content [string] ('ajax') Content of bpopup. Types: ['ajax', 'iframe', 'xlink', 'image' (Added in version 0.9.0)]. If loadUrl isn't defined it'll not use content type. Version 0.4.1
contentContainer [string] (false) Element which content should be added to. If undefined/null it will add it to $(this). Usage contentContainer:'.element' or contentContainer:'#element'.  Version 0.4.1
easing [string] ('swing') The easing of the popup when it opens. 'swing' and 'linear' are built-in in jQuery. If you want more you can use the jQuery Easing plugin. Version 0.9.0
escClose [bool] (true) Should popup close when press on escape?
follow [bool,bool] ([true,true]) Should the popup follow the screen vertical and/or horizontal on scroll/resize? [horizontal, vertical, fixed on screen (see positionStyle instead)] Version 0.3.6. Changed in version 0.5.0 and again in version 0.6.0 and again in version 0.7.0.
followEasing [string] ('swing') The follow easing of the popup. 'swing' and 'linear' are built-in in jQuery. If you want more you can use the jQuery Easing plugin. Version 0.9.0
followSpeed [int/string] (500) Animation speed for the popup on scroll/resize. Version 0.3.6
loadData [object or string] (false) LoadData is representing the data attribute in the jQuery.load() method. It gives you the opportunity to submit GET or POST values through the ajax request. Version 0.9.0
loadUrl [string] (false) External page or selection to load in popup. See loadCallback for callback. Version 0.3.4
modal [boolean] (true) Should there be a modal overlay behind the popup?
modalClose [bool] (true) Should the popup close on click on overlay? Version 0.4.0
modalColor [string] ('#000') What color should the overlay be? Version 0.3.5
opacity [float] (0.7) Transparency, from 0.1 to 1.0 (filled). Version 0.3.3
position [int,int] (['auto','auto']) Defines the position where the popup should pop up. 'auto' = center, [horizontal, vertical]  Version 0.5.0. Changed in version 0.7.0, swapped positions so it's now x, y instead of y, x
positionStyle [string] ('absolute') The popup's position. 'absolute' or 'fixed'  Version 0.7.0
scrollBar [bool] (true) Should scrollbar be visible?
speed [int/string] (250) Animation speed on open/close. Version 0.9.0
transition [string] ('fadeIn') The transition of the popup when it opens. Types: ['fadeIn', 'slideDown', 'slideIn']. Version 0.9.0
zIndex [int] (9999) Popup z-index, modal overlay = popup z-index - 1.
Events
callback Event fires after the popup has loaded.Usage: $('element_to_pop_up').bPopup({ //options }, function(){ //callback }); Version 0.3.5
loadCallback Callback for loadUrl, triggers when the loadUrl is loaded: $('element_to_pop_up').bPopup({ loadUrl: 'test.html', loadCallback: function(){ //doMagic }}); Version 0.8.0
onOpen Event fires before the popup opens.Usage: $('element_to_pop_up').bPopup({ onOpen: function(){ //doMagic }});  Version 0.5.0
onClose Event fires after the popup closes.Usage: $('element_to_pop_up').bPopup({ onClose: function(){ //doMagic }}); Version 0.5.0
Public Function
close() Closes the popup.Usage: $('element_to_pop_up').bPopup().close(); Version 0.4.0
Recycle Bin - not there anymore
duration[int/string] ('normal') Animation speed.Removed in version 0.3.6 - See fadeSpeed and followSpeed.
fadeSpeed [int/string] (250) Animation speed on fadeIn/out. Version 0.3.6. Renamed in version 0.9.0 - see speed instead
minTop [int] (20) Minimum distance from top to popup. Removed in version 0.3.6
vStart [int] (null) Vertical start position for popup. Version 0.3.6, Removed in version 0.5.0 - See Position.
xLink [boolean] (false) Is the popup a xlink popup? Version 0.3.4, Removed in version 0.4.1 use content type instead (content:'xlink')

Changelist

0.9.0 change-list (26.02.13):

  • New option: transition: 'fadeIn'. Now you can change the way the popup should pop up. Default is fadeIn as it always has been, but now it can also 'slideDown' or 'slideIn'. More to follow!
  • New option: loadData: false. loadData is representing the data attribute in the jQuery.load() method. It gives you the opportunity to submit GET or POST values through the ajax request.
  • New option: easing: 'swing' and followEasing: 'swing'. Now you can control the easing effect on open and follow. In jQuery there are two kinds of easings, swing as default and linear. If you want more you can include a plugin like the jQuery easing plugin.
  • New feature: New content type added, 'image'. When using loadUrl (ajax or image) it will recenter when the request has loaded. Be aware of the animate height/width bug in jQuery 1.9.0 (http://bugs.jquery.com/ticket/13183). It's fixed in version 1.9.1.
  • Changed: Renamed the option fadeSpeed to speed. The name fadeSpeed doesn't make sense anymore after I added the new transitions.
  • Changed: Skipped the lowerCamelCase naming convention, sorry, I just don't like it. bClose is now b-close, bModal b-modal and so on.
  • Bugfix: Closing the popup while scrolling will now always close the popup entirely.

0.8.0 change-list (09.01.13):

  • Bugfix: Closing a popup with the public close method didn't unbind the click events properly. The bug was only present if used with multiple popups (Thanks to Ben Meyers for reporting it).
  • Bugfix: Resizing with positionStyle: fixed didn't center.
  • Bug: Apple introduced a timer bug in IOS6 when zooming/scrolling and didn't fix it in the latest release 6.0.1, why I temporary disabled the scroll/resize events in bPopup but only for iDevices with IOS 6 or 6.0.1. I need more time to investigate for a better solution but hopes that Apple will fix it in the next IOS release. I found some fixes which are working but I'll not implement them in bPopup at the time. Fix 1: https://gist.github.com/3798925 Fix 2: https://gist.github.com/4180482 If you want to use one of them include the script before bPopup and remove "isIOS6X" from bPopup (2 places).
  • Changed: The closeclass is now using delegate() instead of the more heavy live() event handler. Important note - this means that bPopup now is depending on jQuery 1.4.2+ instead of 1.3.0+. Is someone using jQuery below version 1.4.2?
  • New option: loadCallback. When using loadUrl you can now define a callback.
  • Cleaned code a bit.

0.7.0 change-list (21.04.12):

  • Bugfix: Multiple popup count fix (Thanks to Michael for reporting)
  • Bugfix: Callback now returns 'this' instead of 'window' (Thanks to Jeppe for reporting)
  • Bugfix: Scroll before popup is loaded opacity fix
  • Bugfix: Moved initialization of popup to after onOpen event so it will center properly when adding stuff onOpen.
  • Changed: Important note - Swapped arguments in Position so it now takes [x, y] instead of [y, x] like everything else in the world.
  • Changed: Important note - Also swapped arguments in Follow so it also takes [x, y] instead of [y, x] and removed third argument. See positionStyle instead.
  • New option: appending: true. Defines if the popup should append to an element or just open where it is.
  • New option: positionStyle: 'absolute'. Defines the position style which has impact on how the popup follows on scroll and resize. Absolute or fixed.
  • Removed private function, getDistanceToBodyFromLeft().

0.6.0 change-list (29.10.11):

  • New feature: Supports multiple bPopups. Now you can open all the bPopups you want on top of each other.
  • New feature: Won't follow if popup is bigger then the window.
  • Changed: Added 3rd parameter to follow, default false. If true the popup will be fixed on the screen.
  • Removed: Browser detecting is bad why I removed the check for IE6. IE6 doesn't support position: fixed but I don't support IE6 any more. I'm afraid I killed it. It's easy to add if you still need to support IE6.

0.5.1 change-list (13.04.11):

  • Bugfix: Added a duration time to the hide() call so onOpen and loadUrl always will be trigged when needed.
  • Bugfix: Added frameborder="0" and scrolling="no" to iframe to remove borders in IE. Removed width="100%" and height=100%" from iframe so you have full control over the iframe
  • Code update: updated the logic regarding follow and position

0.5.0 change-list (12.03.11):

  • bPopup, now with more control and features!
  • New events: onOpen and onClose
  • New option: Position['auto','auto']. Replacing vStart. Gives you full control where the popup should be.
  • Changed option: follow changed to array of booleans, follow[true,true]. Defines if the popup should follow vertical and/or horizontal.
  • Changed option: default value for amsl changed from 150px to 50px.
  • Removed option: vStart, see Position.
  • Removed feature: the popup doesn't auto reset input fields or auto focus any more. If you need this feature do the magic inside the onOpen event.
  • Removed feature: xlink removed from content type. Instead do the xlink stuff inside the onOpen event.
  • Bugfix: Modal overlay fits whole screen on an iphone in safari.
  • Known issue: The popup doesn't center properly when zooming on an iphone in safari.

0.4.1 change-list (17.10.10):

  • New option: content, now it's possible to load content into the popup through Ajax or in an iframe. It takes the url from loadUrl.
  • New option: contentContainer, gives you the possibility to load content into a small area of the popup e.g. a div at the bottom.
  • Removed option: xLink, use content type instead (content:'xlink')!

0.4.0 change-list (22.09.10):

  • Attention: In this update there has been changes that affect how you interact with the popup!
  • New option: modalClose (should the popup close on click on overlay?)
  • New way to create the popup.You should now call $(selector).bPopup() instead of $(selector).openPopup().
  • New way to force popup to close. Force close by calling the public function close(), $(selector).bPopup().close(), instead of triggering the close event with $('.bClose').closePopup(). This will stop cluttering up the $.fn namespace.
  • Changed default value for opacity from 0.5 to 0.7
  • Ensures that the same popup can't be opened twice at a time.
  • Next update will include support for iframes, generic xlink support and more.

0.3.6 change-list (14.07.10):

  • New options: fadeSpeed, follow, followSpeed, vStart
  • Deleted: duration, minTop
  • Included position:absolute styling on popup in plugin

0.3.5 change-list (05.07.10):

  • New option: modalColor
  • bPopup can now take callback functions

0.3.4 change-list:

  • New option: loadUrl
  • The popup can now open an url inside the popup
  • Implemented x-link feature
  • Refactored code, created private help functions
  • Changed default value for scrollBar to true

0.3.3 change-list:

  • New options: opacity, closeClass
  • Changed modal overlay to position fixed in supported browsers. Non position fixed supported browsers still uses position absolute.
  • Added default close event
  • Fixed issue with overlay in IE6+7 and body positioned relative with a width

0.3.2 change-list:

  • Modal overlay width miscalculation on resize.
  • Auto textfield focus
  • Resetting textfields before showing popup

0.3.1 change-list:

  • New options: escClose, zIndex and minTop.
  • Fixed bug with modal overlay when body has position: relative and a width. Now calculates the distance from the left to the body.

0.3.0 change-list:

  • Unbind events on close.
  • Centering popup on resize.
  • Centering popup on horizontal scroll.
  • Refactor code.

What can you do?

  • Report bugs
  • Help optimizing code
  • Give suggestions

License

bPopup is licensed under the DWIWYWBPVMS license. (Do With It What You Want But Please Visit My Sponsor).

Support

Support bPopup by visiting my sponsor:

Downloads

Kommentarer (573) Trackbacks (11)
  1. Can I please ask if there is any way to exactly center the popup vertically? The distance between the top and the popup does not match the distance on the bottom. Thanks

  2. This works great but i dont want my element to dissapear after it pops up. Does anyone know how to solve this?

  3. How can we show a popup for a visitor only ones per day ?

  4. This works great. Thank you for the plugin.

  5. The script os great but is complciate understand your examples.. is it easier if you put some html css and js in one zip.. o rar.. but your example webpage just you can understand

  6. I can´t get it to popup auto then I open my site
    I need simething like this:
    http://shoogledesigns.com/demos/jquery_modal_window.html

    but I like your popup and use it in a few websites
    so I been thankful if you can tell me how to do
    I had try your jsfiddle without success …

  7. using css to alter height in iframe working in Chrome and Safari but not Firefox:

    iframe{
    width:100%;
    min-height:100%;
    }

    using height:100% doesn’t work in firefox or chrome

  8. Hey,

    thanks for the great plugin!

    How could i make it work in a file with a php extension (ex. home.php)? It works fine when I rename it to html, but the whole code is in php and I don’t want to modify it.

    Thanks!

  9. What is the correct syntax (and where in the code do you do it!) for turning on scrollbars for an iFrame popup? I have tried adding the “scrollBar: true” option in different places to no avail.

    Thanks.

  10. Hi I’m trying to use your code with the option of loading an external page but the content is being shrunk. I cannot show all the info and the scrollbar is missed. Even when I already specify.

    // Busca la entrada para la ODS
    $(“#buscar-ods”).on(“input”, function() {
    $( “#buscar-ods” ).autocomplete({
    source: “buscar-ods.php” ,
    minLength: 0,
    select: function( event, ui ) {
    $(‘#popup-detalle-ods’).bPopup({
    zIndex: 99,
    easing: ‘easeOutBack’, //usa jQuery easing plugin
    speed: 650,
    transition: ‘slideDown’,
    scrollBar: true, // I’m waiting for the scroll bar to appear when content is larger than the opened window, but is not showing off
    escClose: true,
    loadUrl: ‘detalle_ods.php?id=’ + ui.item.value //usa jQuery.load()
    });
    $( “#buscar-ods” ).val( ui.item.value );
    return false;
    }
    });
    if( this.value == “”) {
    $(“#busqueda-ods”).val( null );
    } else {
    $(“#busqueda-ods”).val( null );
    }
    });

  11. Glad I found this modal window plugin. I think this is better than Bootstrap or Foundation’s modal plugin.

    @Marco
    You can center it by setting amsl to 0.

  12. I have the problem. I use bPopup with dynamic image load from database, it’s OK but when the first time, the image doesn’t in center. This is the HTML:

    X

    And this is the JS:

    (function($) {
    $(function() {
    $(‘.my-button’).click(function(e) {
    var option = $(this).closest(‘tr’).find(‘select option:selected’);
    var imageUrl = option.attr(‘imageurl’);
    if (imageUrl != undefined && imageUrl != ”){
    $(‘#element_to_pop_up’).find(‘img’).attr(‘src’, imageUrl);
    }else{
    $(‘#element_to_pop_up’).find(‘img’).attr(‘src’, ‘common/images/nophoto.gif’);
    }
    e.preventDefault();
    $(‘#element_to_pop_up’).bPopup({
    content:’image’,
    contentContainer:’.content’,
    });
    });
    });

    Would you please to help me ???
    })(jQuery);

  13. Hi!

    Are you available to freelance?

    I’d like to use this script to open an initial page (popup1), and then within that page have the ability to open another (popup1a) so I can edit content of popup1. Closing popup1a then refreshes content of popup1.

    I’m close, but would be happy to pay to get it working?

    Thanks
    Peter

  14. Hi,

    First off: great plugin. Really love it. Love the flexibility and ease of use. Did notice the same problem as Carlos. When using an ajax url it first opens correctly, but on consecutive popups the width and height was mangled. I am presuming that this happens because on close, those params are reset. Easy fix in my solution was to just set the width and height again for each popup.

    Hope this can help others that bump into this same problem.

    function showPopup(url,width,height)
    {

    $(‘#popup_displayer’).css({‘width’: width, ‘height’: height});
    $(‘#popup_displayer’).bPopup({
    easing: ‘easeOutBack’,
    speed: 650,
    transition: ‘slideIn’,
    contentContainer:’#popup_content’,
    loadUrl: url
    });

    }

    Anyhow, great plugin,
    Thnx!!
    Petros Giakouvakis

  15. Great plugin ! I got only a little problem with scrollBar: true

    $(‘#popupFiltro’ + idLookupTitle).bPopup({scrollbar: true});

    No scrollBars appears in modal popup
    Thank you for answer
    Emanuele

  16. Please consider the pull request on github :)
    https://github.com/dinbror/bpopup/pull/8

  17. i have one website and when user click on image star it bpopup a window but first time it is not in center on the screen, then i close bpopup plugin and the it is centered on the screen. How to fix to center first time on the screen? Here is my code that i im using:

    // DOM Ready
    $(function() {

    // Binding a click event
    // From jQuery v.1.7.0 use .on() instead of .bind()
    $(‘#PopUpItUp’).live(‘click’, function(e) {

    // Prevents the default action to be triggered.
    e.preventDefault();

    // Triggering bPopup when click event is fired
    $(‘#popup’).bPopup({fadeSpeed: ‘fast’, followSpeed: 1500, follow: [false, false], position: ['auto', 'auto']});

    });

    });

  18. Thank You for response. It opens a bpopup window not image…inside bpopup window it is image and some text that is read from mysql database.

    So i need to know how to center bpopup window on first load to be center on the screen. First time when bpopup window is open it is positioned in right center not center center (x,y).

    Then when i close first time bpopup window all the other bpopup windows opens in center, but when reload page it does not center on first time.

    I have played with:

    $(‘element_to_pop_up’).bPopup({
    follow: [false, false], //x, y
    position: [150, 400] //x, y
    });

    position…and play with javascript to get width and height of user screen and then divide with 2 using javascript screen.width and screen.height but then page is not centered.

    Any help welcome..i im thinking position bpopup window using css…but using javascipt is perefered.

    • Example 5b opens an image. You can just add a header too or whatever you need:


      $('element_to_pop_up').bPopup({
      content:'image', //'ajax', 'iframe' or 'image'
      contentContainer:'.content',
      loadUrl:'image.jpg'
      });

  19. Here is soulution..i fix it…if someone need fix this is the code:

    position: [(($(window).width())-960)/2, $(window).scrollTop()+20]});

    so with this code i im getting window width and then minus window size of bpopup window that is filled with data from database (for example: window size of whole web page is 1583px – 960px(size of bpopup window) = 623px and the divide with 2 to get center position witch is 311.5px and whola it is now centered.:)

    To center top the bpopup window i im getting with function scrollTop() the current position on screen of bpopup window and then to get 20px down of top i add 20px to current position. now is all centered and works very fine.

  20. What is the licensing for this plugin? I’ve played with it a bit and I like it. Want to make sure I’m not infringing on any one’s intellectual property.

  21. Hi, I am using in drupal and when I close the modal window the content on the page is not shown anymore, just a blank page, do you know why this might be?

    • Using the inspect element function of chrome I can see that the display: none; css is overridden to allow the div to be displayed on popup, however it is not reset on close. this is causing the empty div to be shown and replacing all page content, how can I stop this from happening?

  22. hi, I need to open popup from bottom to top any help for the same

  23. Is there a way to completely disable the scrolling when the Pop up content is open?

  24. the bpopup codes didn’t work on my pc .can you suggest reason for it

  25. ;(function($) {

    // DOM Ready
    $(function() {

    // Binding a click event
    // From jQuery v.1.7.0 use .on() instead of .bind()
    $(document).ready(function() {
    // Prevents the default action to be triggered.

    if($(‘#element_to_pop_up’).css(‘display’) ==’none’)
    {
    // Triggering bPopup when click event is fired
    $(‘#element_to_pop_up’).bPopup();
    }

    });

    });

    })(jQuery);

    Hi dinbror i tried to load the popup on documnet read with the above code but its not working for me , even i tested with the jsfiddle , still its not doing any thing . Please help thanks

    • You have two document.ready’s! Why are you checking for display == none?

      Try this:

      ;(function($) {
      $(function() {
      $('#element_to_pop_up').bPopup();
      });
      })(jQuery);

  26. Hi all.
    Can someone explain me how the pop up appears always in the center of window?
    How it works ?

  27. Hi. I’m new with jquery.

    I tried edit some edit at Edit this Fiddle with example 3a.

    $(‘element_to_pop_up’).bPopup({
    easing: ‘easeOutBack’, //uses jQuery easing plugin
    speed: 450,
    transition: ‘slideDown’
    });
    But it’s not working. Why? Please advise me, thanks.

    Regards,
    Elvin Lee

  28. By the way, I need to use v0.9.0 developer or v0.9.0 minified? Are they same?

    Sorry for keep asking some newbie question.

    Regards,
    Elvin Lee

  29. Hi.

    I had tried this code on CentOS, but seen can’t run when I use index.html on localhost. But it’s work when I just double click the index.html.

    Why?

    1. localhost (No response)
    http://i12.photobucket.com/albums/a227/elvinlee/Other/Screenshot2013-06-08at11947PM_zps0647fb11.png

    2. Double click(Work)
    http://i12.photobucket.com/albums/a227/elvinlee/Other/Screenshot2013-06-08at11951PM_zpsd0eb3b95.png

    Regards,
    Elvin Lee

  30. Sorry for keep asking. I had downloaded Firebug to check what’s wrong when run on localhost. It shows GET jquery-2.0.1.min.js and jquery.bpopup-0.9.0.min.js 403 Forbidden.

    Here is the error:
    http://i12.photobucket.com/albums/a227/elvinlee/Other/Screenshot2013-06-08at15612PM_zps8adcb23b.png

    And here is my code for index.html:
    http://i12.photobucket.com/albums/a227/elvinlee/Other/Screenshot2013-06-08at15555PM_zps17c56bcc.png

    Regards,
    Elvin Lee

  31. Hello,

    This is a great plugin, thank you so much!

    I am trying to fill the popup with a form that includes a select control (forrm dropdown). i created an invisible div that contains the form with the controls, and I fill the content of the popup with the html of that div – this works well so far.

    Now, I want to dynamically set the selection based on the button the user clicked, but i cannot set it with the .val() function – any idea how to make it work?

  32. Hello there,

    First of all great plugin for jQuery, using alot, now I just have a small question, I using alot the loadUrl and I wanted to be able to resize the modal window everytime I change page.. some have more text, others less.. is there anyway to do it? thanks

  33. Please how do cause a post back using a button in the popup window. I added a button but when clicked, it does nothing. Please why??

  34. Great looking pop-ups! Nice work… but – as the one guy said – the examples are best understood by the author. I look at the “usage” area and only see the JS code. There’s no working example that’s complete with CSS, HTML and the JS.

    I looked at the source of the page with all the cool pop-ups and was unable to figure out how to get mine to remotely resemble yours. After nearly an hour, and I am providing this strictly as feedback to help, not insult…

    I gave up and went with Reveal (http://zurb.com/playground/reveal-modal-plugin).

  35. Hello,

    Great plugin but unfortunately i cannot really use i’m not into jquery.

    How would you proceed to trigger the Bpopup on load without needing to click on something ?
    http://jsfiddle.net/24A9b/5846/

    I have tried so far but without any results.

    Thank you for the help !

  36. Hello,

    Thanks for sharing good popup and very lightweight.
    I have one small issue and it pinch out me.
    I can’t set focus on any control(like textbox) when popup open.
    Can you please send me solution of my issue?

    Thank You

  37. Great Plugin..!!!

    i have a question, how to load animation .gif like example 5c…? thank’s before.. :)

  38. I came back – yours is the most flexible and I finally got things figured out. But…

    now I’m in a situation where I either have to figure this out, or switch to something else even if I cease using a pop-up method.

    My “submit” button on the bPopup form will not do anything. I am using ASP.NET web forms project with nested master pages.

    I have form validation using ASP.NET and it works. But once all required fields are filled, the submit button does NOTHING. Any ideas?

  39. Wow! Me again… problem resolved! It was simply the “append: ‘form’” line for ASP.NET… which you do mention on this very page!

    My apologizes and congrats for producing such a cool pop-up for jQuery! Thank you for your efforts.


Leave a comment