Direct SuperBox show

Create issue
Issue #15 open
Former user created an issue

I'm trying to directly show the superbox content on 'onload' event of the page, but there isn't a easy way to that...

Comments (21)

  1. Pierre Bertet repo owner
    • changed status to open

    You can click on your link just after the SuperBox init :

    $(function(){
        $.superbox();
        $("a.your-link").click();
    });
    

    If you need to fill SuperBox with a custom function, an update will be available soon.

  2. Former user Account Deleted

    Hello,

    Is there a method to open a SuperBox automatically on page load with 0.9.2-dev (with the new open method may be) ? I'm working on a project with your script and I must do it.

    Thank you.

  3. Pierre Bertet repo owner

    You can use this syntax:

    $.superbox.wait(function() {
      $.superbox.open('<div>Hello !</div>');
    });
    
  4. Former user Account Deleted

    Merci beaucoup, ça marche très bien. Est-il utile de préciser qu'il faut faire cet appel après l'initialisation de la page et de superbox...?

    Super script très très utile !

    _____________

    Thank's a lot, it works fine. Must we say to call this script after loading the page and initializing superbox...?

    Very good script and very usefull !

  5. Former user Account Deleted

    Hello,

    I tried this function and it works well ! I tried to open an iFrame instead of HTML content but it doesn't work :-(

    Is it possible to open a SuperBox as an iFrame link with an URL ?

    Thank you.

  6. Former user Account Deleted

    I have found how to ! It's so basic that I don't think about it immediatly ^^

    Just open the superbox with an iframe html code !

    $.superbox.wait(function() {
      $.superbox.open('<iframe title="My_iFrame" name="My_iFrame" frameborder="0" scrolling="none" width="100%" src="Page_URL"></iframe>');
    });
    
  7. Pierre Bertet repo owner

    Just like that :

    $.superbox.wait(function() {
      $.get('ajax/test.html', function(data) {
        $.superbox.open(data);
      });
    });
    
  8. Former user Account Deleted

    It works, thank you Pierre. Is it possible to set the [height X width] option in the open() function?

  9. Former user Account Deleted

    I found it, I should have looked inside the code :|

    $.superbox.wait(function() {
      $.get('ajax/test.html', function(data) {
        $.superbox.open(data,{boxWidth:650,boxHeight:450});
      });
    });
    
  10. Former user Account Deleted

    Gee... I should have looked inside the code... :|

    $.superbox.open(data,{boxWidth:650,boxHeight:450});

  11. Former user Account Deleted

    Gracias Pierre Bertet. Tus modificaciones me han sido muy útiles... Saludos desde Perú. :-)

  12. Former user Account Deleted

    hi Pierre,

    I tried to open superbox using an id

    $.superbox.open(data, {boxId:newId boxWidth: 400, boxHeight: 400 });

    How do i use style sheet for this superbox (newID) only, i use the newID in stylesheet but the superbox(newID) is not getting centeralized

  13. Log in to comment