test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • hamidnpc Friend
    #184136

    I wanna make a change in “click to load more images” button.(in home page)
    How can I define an external link for this button? (for example link to a page) So when I click on this button, new page (external link) open in new window.
    thanks a lot

    Luna Garden Moderator
    #480434

    Hello,

    In order change the behavior of Load more button as you said, go to this file: <blockquote>templatesja_lensjswall.js</blockquote>

    Comment out these lines:

    $('#item-more').click(function(){
    $('h3:first', this).hide();
    $container.infinitescroll('retrieve');
    });

    Like this:

    /*$('#item-more').click(function(){
    $('h3:first', this).hide();
    $container.infinitescroll('retrieve');
    });*/

    Then find these lines:

    $('<div id="item-more" class="item item-more"><div class="inner item-inner clearfix"><h3>Click To Load More Awesomeness...</h3></div></div>').appendTo ($container);

    change to
    <blockquote>$(‘<div id=”item-more” class=”item item-more”><div class=”inner item-inner clearfix”><h3><a href=”your_link_here”>Click To Load More Awesomeness…</a></h3></div></div>’).appendTo ($container);</blockquote>

    Remember to backup your file before processing.

    hamidnpc Friend
    #480645

    Thanks Luna Garden ,
    Please retest demo,
    At last we have ) ,How i can remove it?

    Luna Garden Moderator
    #480764

    <em>@hamidnpc 356320 wrote:</em><blockquote>
    Please retest demo,
    At last we have ) ,How i can remove it?</blockquote>

    Sorry, I don’t get your question ? I have tried my suggestion first, before putting it up here.

    You can try my code here:

    <blockquote>$(‘<div id=”item-more” class=”item item-more”><div class=”inner item-inner clearfix”><h3><a href=”http://www.joomlart.com”>Click To Load More Awesomeness…</a></h3></div></div>’).appendTo ($container);</blockquote>

    hamidnpc Friend
    #481045

    Hi again, Thanks alot, but the way you provided, did not solve my problem completely.
    If I click on this button (not text into button) more images loads… This is bad!
    If I click on “text” into this button, a new page (external link) will be open, This is just what I wanted.
    in other words.. I wanna define an external link for button and its text (both of them).
    and I don’t like to load more images at all.

    Luna Garden Moderator
    #481105

    Hello,

    You can try this:

    Find:

    $('#item-more').click(function(){
    $('h3:first', this).hide();
    $container.infinitescroll('retrieve');
    });

    Change to:

    $('#item-more').click(function(){
    window.open("http://joomlart.com"); >> change with your URL
    });

    Clear cache when you done.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  Luna Garden 11 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum