我用这个射手来控制菜单的下降
Is it possible to tell the script always to display sub-menus - but only if there are any? Hope someone can help.
Ex code: http://jsfiddle.net/zQU7H/
我用这个射手来控制菜单的下降
Is it possible to tell the script always to display sub-menus - but only if there are any? Hope someone can help.
Ex code: http://jsfiddle.net/zQU7H/
满足对评论 < /强 > 所解释的需要的 < 强/强 >
在理解你需要什么(请下次试着解释一下你的问题)之后,这里有一个更新的 Fiddle that mgiht help you. 在这种情况下,我怀疑(如果我错了的话,纠正我)你不会使用与你网站的hashs的联系,而它所做的是搜索一个hash,这个hash,应该等于元素的名称(你可以突出它),你喜欢显示子菜单。例如:
您可以手动或使用 jquery :
$("#productNav ul li").each(function(){
var title = $(this).children("a").attr("title");
$(this).find("li a").attr("href",function(index,oldattr){
return oldattr+"#"+title;
});
});
此代码将添加一个标签和标题菜单父选项 。
< 强 > ORIGINAL 强 >
我不知道我是否理解你的问题是否正确, 但如果有帮助, 我更新了Khaled_webdevs Fiddle:http://jsfiddle.net/zQU7H/5 。
它一次显示一个子菜单, 如果显示另一个子菜单, 则更改它 。 在此示例中, 我做了第一个要显示子菜单元素的元素, 但是您可以删除这个元素, 并做任何您想要显示的子菜单, 首先是添加“ 流” 类 。
希望这能帮上忙
i 添加了一个类当前值以模拟 Li 的活性链接
http://jsfiddle.net/zQU7H/2/" rel="no follow" >http://jsfiddle.net/zQU7H/2/
可能不是最终解决办法
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...
Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...
Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...
I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...
Is it possible for someone to give me a few pointers on how to display a multidimensional array in the form of a bar graph? The array is multidimensional, with three elements in each part - and the ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.