I want to fix the last widget of my sidebar but it should only be visible at the moment it becomes fixed

0

Hello, I'm working with a wordpress template and this is my problem when I created a final widget in my sidebar, so I gave it the property of visibility: hidden so

   div#ad_widget_sizes_exm1-19 .ad-widget-sizes {
   visibility: hidden;
}

here is the page if you wish to visualize it for now it should only work with the posts link

and to make it work I made a small script but at the moment of executing it stays visible: hidden it is not a jquery problem because I have put in a lot of thanks for any help

    <script type="text/javascript">
var ity = jQuery.noConflict();
  if(ity(".home-widget .one-part .navigation-has-menu").hasClass(".fixed-widget")){
    console.log("ERROR");
    ity("div#ad_widget_sizes_exm1-19 .ad-widget-sizes").css("visibility", "visible");
}

  </script>
    
asked by CristianTAC 16.11.2016 в 17:31
source

1 answer

0
  

There is an error in the selector ity(".home-widget .one-part .navigation-has-menu") , the same as it returns empty, that is, there is no element that complies with this rule .

On the other hand, if I write it without spaces, like this:

ity(".home-widget.one-part.navigation-has-menu")

Returns exactly 1 element. This selector translates to: search for items that have home-widget, one-part y navigation-has-menu classes.

    
answered by 16.11.2016 в 19:51