X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fmehrpadin%2Fsuperfish%2Fsfsmallscreen.js;h=9765fedc9b7844595a5c5c5f7981610c00146475;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=7a2d1981cbcff201c0e0df5ddf9e3c854a34a280;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/mehrpadin/superfish/sfsmallscreen.js b/vendor/mehrpadin/superfish/sfsmallscreen.js index 7a2d1981c..9765fedc9 100644 --- a/vendor/mehrpadin/superfish/sfsmallscreen.js +++ b/vendor/mehrpadin/superfish/sfsmallscreen.js @@ -71,7 +71,7 @@ return refined; } - // Creating ', + items += '', childUL = list.find('> ul'); // Using the function for the sub-menu of this item. for (var u = 0; u < childUL.length; u++){ @@ -135,7 +136,7 @@ $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion'); }); // Doing the same and making sure all the sub-menus are off-screen (hidden). - accordion.find('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); + accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); // Creating the accordion toggle switch. var toggle = '
' + options.title + '
'; @@ -167,7 +168,7 @@ // If the accordion is already expanded: // Hiding its expanded sub-menus and then the accordion itself as well. accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded') - .end().find('ul').hide() + .end().children('ul').hide() // This is a bit tricky, it's the same trick that has been in use in the main plugin for some time. // Basically we'll add a class that keeps the sub-menu off-screen and still visible, // and make it invisible and removing the class one moment before showing or hiding it. @@ -246,7 +247,7 @@ // Creating the