Usng wp-slimbox2 with infinite scroll and other ajax plugins

Forums Forums Slimbox2 plugin Usng wp-slimbox2 with infinite scroll and other ajax plugins

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #5305
    malcalevak
    Moderator

    Your second chunk of code doesn’t make any sense….

    #5306
    Anonymous
    Member
    "malcalevak" wrote:
    Your second chunk of code doesn’t make any sense….

    It’s a unix diff output

    I will just paste the entire JS file output (what is created by the PHP file):
    [code:21h1tcvk]
    function slimbox_autoload() {
    jQuery(function($) {
    var options = {
    loop: false,
    overlayOpacity: 0.8,
    overlayFadeDuration: 1,
    resizeDuration: 1,
    resizeEasing: "swing",
    initialWidth: 250,
    initialHeight: 250,
    imageFadeDuration: 1,
    captionAnimationDuration: 1,
    counterText: "Image {x} of {y}",
    closeKeys: [27, 88, 67],
    previousKeys: [37, 80],
    nextKeys: [39, 78]
    }
    $("#lbOverlay").css("background-color","#000000");
    $("#lbPrevLink").hover(
    function () {
    $(this).css("background-image","url(‘http://www.tinyways.com/wp-content/plugins/wp-slimbox2/images/default/prevlabel.gif’)");
    },
    function () {
    $(this).css("background-image","");
    }
    );
    $("#lbNextLink").hover(
    function () {
    $(this).css("background-image","url(‘http://www.tinyways.com/wp-content/plugins/wp-slimbox2/images/default/nextlabel.gif’)");
    },
    function () {
    $(this).css("background-image","");
    }
    );
    $("#lbCloseLink").css("background","transparent url(‘http://www.tinyways.com/wp-content/plugins/wp-slimbox2/images/default/closelabel.gif’) no-repeat center");
    $("a[href]").filter(function() {
    return /.(jpg|png|gif)(?[dw=&]*)?$/i.test(this.href);
    }).slimbox(options, null, function(el) {
    return (this == el) || ($(this).parents("div.post, div#page")[0] && ($(this).parents("div.post, div#page")[0] == $(el).parents("div.post, div#page")[0]));
    });
    });}
    slimbox_autoload();
    [/code:21h1tcvk]

    You can see I wrapped it all into a function

    Any chance to see this in the main version? So I won’t have to change after each upgrade.

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.