• Resolved pansenschim

    (@pansenschim)


    Hello there!
    I integrated collapse-o-matic in to my tribe events month overview. But I have 2 problems here:

    1. The posts on my month-view page are open on pageload and collapsed after the page finished loading (maybe you have a solution here)

    2. The search results and next page results are loaded via Ajax (I guess?). The content on those pages is not collapsed. Only after page reload those boxes do collapse. I added a script to my page-head, and I tried to disable ajax for search result pages, but I had no success with that.

    jQuery(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    	collapse_init();
    });

    If you could help me here I would appreciate that very much.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter pansenschim

    (@pansenschim)

    PS – Im going to buy the PRO Version if that helps ??

    Plugin Author twinpictures

    (@twinpictures)

    Let’s see if we can get you pointed in the right direction:

    1. The posts…are open on pageload and collapsed after the page finished loading

    how long does it take for your page to load? On page load and after page finishes loading *should be* nearly the same moment. However, if the page is loading alot of content, try adding targclass=”maptastic” to the expand elements.

    2. The search results and next page results are loaded via Ajax

    A link would be helpful here. However, if the search results content is being loaded dynamically, then yes, there needs to be a function triggered once the content loads. This is called a callback, and it should look something like what was posted above.

    Where did you get the callback:

    jQuery(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        //magic goes here
    });
    

    This seems to only be bound to the .searchandfilter element. Is this the element where the content is being loaded into?

    PS – Im going to buy the PRO Version if that helps

    Going pro will connect you to personal support, if you need this resolved immediately, this is your best bet.

    Thread Starter pansenschim

    (@pansenschim)

    Thanks a lot!
    Im bound to other projects now and it will take some time to test and get back to you. Stay tuned as I will post an answer. Thanks for your help!

    Best,
    Benedikt

    Thread Starter pansenschim

    (@pansenschim)

    Hello @twinpictures,
    I added two classes to the collapse-o-matic content via the backend controls. The Targclass Attribute is now “my-beschreibung maptastic”. I changed the jQuery script code and added it via header and footer scripts:

    <script>
    jQuery(document).on("sf:ajaxfinish", ".my-beschreibung", function(){
    	collapse_init();
    });
    </script>

    Is “element where the content is being loaded into” referring to a div class which is added to the target via “targclass”?

    Thanks in advance!

    Plugin Author twinpictures

    (@twinpictures)

    Again, where are you getting this callback from?
    Which theme/plugin is responsible for the Ajax loaded results, and where is the related documentation on:
    jQuery(document).on("sf:ajaxfinish"...

    If this is the correct callback, first verify that this is triggering on successful content load by calling something like:

    jQuery(document).on("sf:ajaxfinish", ".my-beschreibung", function(){
    	alert('content loaded');
    });
    

    if an alert message pops up, then we know the sf:ajaxfinish callback is being correctly triggered.

    Plugin Author twinpictures

    (@twinpictures)

    Any update on this?

    Without a link it’s really difficult to troubleshoot and provide possible solutions. We did, however, do a quick google search on sf:ajaxfinish; are you by chance using the search & filter pro plugin?

    Thread Starter pansenschim

    (@pansenschim)

    Hello there- thanks for your reply! Im sorry, took me some days, but now im back in business here and want to go ob with this. I purchased and installed the pro version and I guess we will go on via e-mail from here.

    Best!
    Pansenschim

    Plugin Author twinpictures

    (@twinpictures)

    Nice! We’ll mark this issue as resolved. And it will be, you’re in good hands.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Collapse-o-matic disabled on ajax result pages’ is closed to new replies.