• Resolved a.bernstein90

    (@abernstein90)


    Hello, first of all thank you for this awesome Plugin.

    The problem I am experiencing is the following:

    When I open the page with all the supposedly collapsed content said content is not collapsed. If I refresh the page the content is collapsed. This happens with all browsers known to me, I tried it on Firefox, Chrome, Safari and IE.

    The interesting part is that I tried to solve the issue by providing a “collapse all” as well as a “expand all” button on the page, but these buttons appear to have the exact opposite effect until I refresh the page.

    I already tried using the

    <div class="content_collapse_wrapper">
    [expand title="tirgger1"]content1[/expand]
    ...
    [expand title="tirggerN"]contentN[/expand]
    </div>

    approach I found in another thread, this lead to my content disappearing completely.

    To reproduce the problem click here and then select Photography (the one with the mainly orange circle). Direct links to the page or refreshes word properly, just coming from the page mentioned above doesn’t seem to work.

    Thanks in advance!

    http://ww.wp.xz.cn/plugins/jquery-collapse-o-matic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter a.bernstein90

    (@abernstein90)

    Out of curiosity I tried this (while renaming the old collapse_init to collapse_init_old):

    function collapse_init()
    {
      //timeout
      setTimeout(collapse_init_old, 4000) //wait four seconds before continuing
    }

    This doesn’t do the trick for me though as it’s rater distracting to see the content collapse after you’ve already started to look at it.
    I sure hope there is a better solution 😀

    Thread Starter a.bernstein90

    (@abernstein90)

    I’ve found the culprit. There seems to be a problem with my theme, I use Workality Lite.

    After noticing that the problem only occured when opening the page from the “works” page I looked around to see in what way links from that page are opened differently. What I found was this (for other people experiencing this issue with the workality theme, this is in the drone.js file):

    /// GET POSTS
    $('a.getworks').live('click',function(e) {
    var id = $(this).attr('data-id');
    var token = $(this).attr('data-token');
    var murl = $(this).attr('href');
    var type = $(this).attr('data-type');
    
    $('html, body').animate({scrollTop:0}, 'slow', "easeInOutExpo");
    $('.ajaxloader').fadeIn();
    $('.sliderdiv').slideUp();
    
    $.post(mdajaxurl.ajax,{action:'md_work_post',token:token,id:id, type:type},function(data) {
    	if(data!=0) {
    	$('#post-list').fadeOut('normal',function() {
    		updatelinks(murl);
    		$('.navibg.withall').hide();
    		$('.works-single').hide().html(data).fadeIn('normal');
    		$(".fitvids").fitVids();
    		$('.ajaxloader').fadeOut();
    		socialRevive();
    		if(type=='blog') {
    		postCommentAjax();
    		}
    	});
    	}
    });
    //		e.preventDefault();
    });

    Uncommenting e.preventDefault(); did the trick.

    I don’t want to mark this topic as resolved just yet since I’d prefer a solution that doesn’t involve modifying the theme if possible.

    Plugin Author Baden

    (@baden03)

    As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live()
    http://api.jquery.com/live/

    So… yeah. I think you might want to open up a support issue with your theme developer.

    Make sense?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Content not collapsed’ is closed to new replies.