need to add condition to hoverscroll

need to add condition to hoverscroll

hi guys, i am playing with the hoverscroll plugin,

this is the plugin page

hoverscroll

The plugin has api for true and false for arrows, however because i am populating the <li>'s with content dynamically from a database. I need to turn arrows to false if the content height is less than the container height as they both become visible if the content is not as tall as the container

i was kinda thinking of several ways to achieve this but my jquery knowledge is rather limited

i managed to get the arrows to dissappear on load but once the mouse goes over and triggers the scroll function to check they appear and stay on

what i am thinking though is the below is not required, i think that this could probably b accomplished by calling a function in the parameters for arrows to turn off, im just not sure how to do it
  1. if (params.arrows) { // if arrows true
    if(myh < params.height){ // added this
    $('.arrowleft, .arrowright, .arrowtop, .arrowbottom', ctnr).hide();
    }else{
           setArrowOpacity();
    }
    }else{ // if arrows false
    $('.arrowleft, .arrowright, .arrowtop, .arrowbottom', ctnr).hide();
    }












----------------

every time you think you got it sussed you find another challenge


















    • Topic Participants

    • jason