Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Delay for a Drop Down Menu Rate Topic   - - - - -

 
  • HempUSA
  • Newbie
  • Members
  • Join Date: 13-Sep 11
  • 12 posts

Posted 20 January 2012 - 07:20 PM #1

Greetings!

This is driving me nuts! I have been working on using the jQuery function "hoverintent" to slow down my menus but I can't seem to get it to work.

Let me share some of the code samples that I have tried.

This is my index.tpl

{* $Id$ *}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$smarty.const.CART_LANGUAGE|lower}">
<head>
{strip}
<title>
{if $page_title}
{$page_title|escape:"html"}
{else}
{foreach from=$breadcrumbs item=i name="bkt"}
{if !$smarty.foreach.bkt.first}{$i.title|unescape|strip_tags|escape:"html"}{if !$smarty.foreach.bkt.last} :: {/if}{/if}
{/foreach}
{if !$skip_page_title}{if $breadcrumbs|count > 1} - {/if}{$location_data.page_title|escape:"html"}{/if}
{/if}
</title>
{/strip}
{include file="meta.tpl"}
<link href="{$images_dir}/icons/favicon.ico" rel="shortcut icon" />
{include file="common_templates/styles.tpl" include_dropdown=true}
{include file="common_templates/scripts.tpl"}

{literal}
<script src="js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.hoverIntent.minified.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">

//<![CDATA[
$(document).ready(function() {

function addMega(){
$(this).addClass("hovering");
}

function removeMega(){
$(this).removeClass("hovering");
}

var megaConfig = {
interval: 55,
sensitivity: 8,
over: addMega,
timeout: 500,
out: removeMega
};

$("li.mega").hoverIntent(megaConfig)


});


//]]>
</script>
{/literal}

</head>

<body>
{if "SKINS_PANEL"|defined}
{include file="demo_skin_selector.tpl"}
{/if}
<div class="helper-container">
<a name="top"></a>
{include file="common_templates/loading_box.tpl"}

{include file="main.tpl"}

{if "TRANSLATION_MODE"|defined}
{include file="common_templates/translate_box.tpl"}
{/if}
{if "CUSTOMIZATION_MODE"|defined}
{include file="common_templates/template_editor.tpl"}
{/if}
{if "CUSTOMIZATION_MODE"|defined || "TRANSLATION_MODE"|defined}
{include file="common_templates/design_mode_panel.tpl"}
{/if}
</div>

{hook name="index:footer"}{/hook}

</body>

</html>

When this is active, all of my jQuery routines stop working and the menu totally stops working.

It seems that every time I try to add this routine, it stops all jQuery and I can't figure out what I am doing wrong. I am not that familiar with jQuery and have been following guides that I have seen on the internet.

The menu that I am using, I found from the following link that was listing in this forum:
http://forum.cs-cart...200#entry106200

I visited his site and it appears that he has a delay working for his menus, but I can't fully figure out how he did it.

And I have been reading and trying to understand what I found at this site:
http://www.designche...etting-started/

My site that I am building the site on is: http://www.globalgiveaway.org

Any help will be greatly appreciated!

Thank you,

Jon