Rev 13 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13 | kardasa | 1 | /*####################################################################### |
2 | # This script is distributed in the hope that it will be useful, |
||
3 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
4 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
5 | # GNU General Public License for more details. |
||
6 | # Author: Andrzej Kardaś |
||
7 | # License: GPLv3 |
||
8 | # The full version of the licencse can be obtainted by visiting: |
||
9 | # http://www.gnu.org/licenses/gpl.html |
||
10 | #######################################################################*/ |
||
11 | $(document).ready(function(){ |
||
15 | kardasa | 12 | var $menu = $('.artmenu'); |
13 | $menu.children('li.nav_menu').each(function(){ |
||
14 | var $this = $(this); |
||
15 | var $anchor = $this.children('a'); |
||
16 | var $submenu = $menu.find('ul.submenu'); |
||
17 | $anchor.data('width',$anchor.width()); |
||
18 | |||
19 | $this.mouseenter(function(){ |
||
20 | $submenu.stop(true,true).hide(); |
||
21 | $anchor.stop().animate({'width':'227px'},300,function(){ |
||
22 | $this.find('ul.submenu').slideDown(500); |
||
23 | }); |
||
24 | }).mouseleave(function(){ |
||
25 | $submenu.stop(true,true).hide(); |
||
26 | $anchor.stop().animate({'width':$anchor.data('width')+'px'},300); |
||
27 | }); |
||
28 | }); |
||
13 | kardasa | 29 | }); |