Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Baden

    (@baden03)

    Hmmm, interesting idea.
    something like this might work using our good friend jQuery:

    jQuery(document).ready(function(){
      var changeWidth = function(){
        if ( jQuery(window).width() < 768 ){
        jQuery('.collapseomatic').addClass('.colomat-close');
        }
      };
      jQuery(window).resize(changeWidth());
    });

    We’ll look into this some more and get back to you.

    Plugin Author Baden

    (@baden03)

    Hello again. OK! We have something to report back.
    1. First step is to upgrade to Collapse-O-Matic version 1.5.9c currently available only from the Plugin Oven: http://plugins.twinpictures.de/plugins/collapse-o-matic/

    2. Next, install our new fancy plugin: Inject-O-Matic, also currently available only from the Plugin Oven: http://plugins.twinpictures.de/plugins/inject-o-matic/

    3. With both plugins installed and activated, navigate to: Dashboard > Settings > Inject-O-Matic and paste the following in the Footer Script section:

    function check_size() {
        if ( jQuery(window).width() < 768 ){
           colomat_expandall();
        }
        else{
           colomat_collapseall();
        }
    }
    jQuery( window ).resize(check_size);
    check_size();

    Give that a try and if it works, dance a little jig of joy and joyfulness. Please post back with your results.

    Thread Starter despachotres

    (@despachotres)

    Hi,

    SIMPLY BRILLIANT!!!! It works like a charm. Really, really great.

    The website is not live, so I’m going to paste some screenshots to show you how I’ve customized it. I think this can be a great idea for you.

    1) When full resolution (in my case, when browser resolution is greater than 480px), I hide the “show more” text. Si it seems to be a regular text.

    Look at the screenshot: bit.ly/1peRWGf

    2) When browsing with a smartphone (<480px) the text is hidden and the “show more” button is displayed.

    Take a look: bit.ly/Wf41TR

    As you can see, I’ve customized the “show more” text to look like a button.

    Just AMAZING!!!

    Thanks very much again.

    P.D. In the code, the conditional should be “>768” to expand all.

    Plugin Author Baden

    (@baden03)

    glad you got it working. was a good challenge. If you are happy (and you seem to be) please consider leaving a review to help others! Issue marked as resolved. Yay!

    Thread Starter despachotres

    (@despachotres)

    Done. 5 stars for you!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Expanded/collapsed depending on screen resolution’ is closed to new replies.