Advertisement:

Author Topic: Bender hide categories on under 480 px on home page like in contact  (Read 633 times)

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Hi,
How to make home page show categories like they are shown in contact page on less than 480 px screens?

I added the button from header for this but has no effect.. I changed other things in functions.php but no luck either.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Bender hide categories on under 480 px on home page like in contact
« Reply #1 on: December 15, 2017, 12:14:12 am »
I found in global.js

Code: [Select]
bender.toggleClass = function(element,destination,isObject) {
    var $selector = $('['+element+']');
    $selector.click(function (event) {
        var thatClass  = $(this).attr(element);
        var thatDestination;
        if (typeof(isObject) != "undefined"){
            var thatDestination  = $(destination);
        } else {
            var thatDestination  = $($(this).attr(destination));
        }
        thatDestination.toggleClass(thatClass);
        event.preventDefault();
        return;
    });
}

and

Code: [Select]
    bender.toggleClass('data-bclass-toggle','body',true);This is adding/removing the display-cat class to body tag in contact or page type page when the header "button" is clicked.

What and where to change to extend it's effect on home page to, but only @ under 480 px;

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Bender hide categories on under 480 px on home page like in contact
« Reply #2 on: December 15, 2017, 03:19:33 am »
I solved it with parallel coding.
« Last Edit: December 15, 2017, 03:48:46 am by marius-ciclistu »