{% else-1 %}
Создай на своем сайте такое простое и удобное выпадающее меню с помощью jQu

                        
<?php
< script type = "text/javascript" >
// код сниппета
( function ( $ ) {
$ . fn . dropDownBlock = function ( block , options ) {
var defaults = {
speed : 'fast' ,
top : $ ( this). height(),
left : 0
},
opts = $ . extend( defaults , options ),
toggler = $ ( this),
block = $ ( block);
toggler . css ({ 'outline' : 'none' })
toggler . click( function ( e ) {
e . preventDefault();
$ ( block). css ({
'position' : 'absolute' ,
'top' : ( toggler. offset(). top + opts [ 'top' ]) + 'px' ,
'left' : ( toggler. offset(). left + opts [ 'left' ]) + 'px'
});
if ( $ ( block ). is ( ':visible' )) $ ( block). fadeOut( opts[ 'speed' ]);
else $ ( block). fadeIn( opts [ 'speed' ]);
this . focus ();
});
toggler . blur ( function () {
$ ( block). fadeOut( opts [ 'speed' ]);
});
};
})( jQuery );
// использование
// при клике на #toggler
// под ним показывается #drop-down-list
$ ( '#toggler' ). dropDownBlock( $ ( '#drop-down-list' ), {
speed : 'slow' ,
left : 10
});
</script>
?>
0 21 0
0

Нет фото
• 4 авг 2013, 01:52


так разве не проще?
===============================
$(\'div.link\').hover(function(){
$(this).children(\'div.link_list\').show();//slideDown,fadeIn
},function(){
$(this).children(\'div.link_list\').hide();//slideUp,fadeOut
});