PDA

View Full Version : jQuery Menu Issues


Chapo
05-29-2012, 03:10 PM
Ok... i created a jQuery Drop Down Menu for a clients site and it works fine alone. But when i add it to the site it goes crazy, you rollover the Menu and the Drop Down Menu appears someplace else and not below the Menu button. How can i fix this issue ? Thanks

www.tuemisora.com

davidj
05-29-2012, 08:01 PM
Its a conflict with CSS I think. Make sure <li> <ul> and <div> have the correct class / id's as per the original example you took it from

Chapo
05-29-2012, 08:19 PM
Well, i downloaded that jQuery and custumized it to my site. Its works nice alone but it breaks when i add it to my site. I looked the css and class and can't find the issue.

edbr
05-30-2012, 01:41 AM
try adding .sublinks and giving a top and left position

Chapo
05-30-2012, 01:49 AM
What do you mean with adding .sublinks ?

edbr
05-30-2012, 01:55 AM
<li class="sublinks">
<a href="#">home</a>
<a href="#">quienes somos</a>
<a href="#">cursos</a>
<a href="#">servicios</a>
<a href="#">viajes</a>
<a href="#">staff</a>
<a href="#">galeria</a>
<a href="#">videos</a>
<a href="#">enlaces</a>
<a href="#">calendario</a>
<a href="#">pay online</a>
<a href="#">contacto</a>
</li>

Chapo
05-30-2012, 03:36 AM
Just tried and nothing happens...this is frustrating

edbr
05-30-2012, 04:14 AM
its the offset in the script changing to this makes it directly below

<script type="text/javascript">

$(function(){
$('.dropdown').mouseenter(function(){
$('.sublinks').stop(false, true).hide();

var submenu = $(this).parent().next();

submenu.css({
position:'absolute',
top: $(this).offset().top + $(this).height() + 'px',
left: $(this).offset(),
zIndex:1000
});

submenu.stop().slideDown(300);

submenu.mouseleave(function(){
$(this).slideUp(300);
});
});
});
</script>