ul

CSS Space between menu and submenu

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is what I'm trying to do: If you noticed there is space between the menu and the submenu. The problem is that the submenu doesn't work this way, because when the mouse pointer leaves the menu the submenu disappears. It only works if it looks like this: How can I leave the space between the menu and the submenu and get it to work? My Code: JSFIDDLE CODE HTML: <body> <nav> <ul> <li><a href="#">One</a> <ul> <li><a href="1.html">1.1</a></li> <li><a href="2.html">1.2</a> </ul> </li> <li><a href="#">Two</a> <ul> <li><a href="3.html">2.1</a><

How Can I Add a “Selected” Class Based on URL with jQuery?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a sidebar list of links in my wikispace theme that currently uses jQuery to apply a class to each of the sidebar links based on the URL after the .com/. You can see this being applied in the code below... <div class="WikiCustomNav WikiElement wiki"><a href="/" class="">Home</a> <a href="/Calendar" class="calendar">Calendar</a> <a href="/Science" class="science">Science</a> <a href="/Language+Arts" class="language-arts">Language Arts</a> <a href="/Video+Page" class="video-page">Video Page</a> <a href="/Code+Page" class="code-page">Code

PHP: How to generate a &lt;ul&gt;&lt;li&gt; tree in an xml2assoc array result?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have seen many PHP function on how to generate a <ul><li> tag but my array input is quite complicated I guess. It is an array returned from a custom function called xml2assoc My question is how can I convert the returned xml2assoc array result to a <ul><li> formatted HTML code using PHP. Thanks. $tree = array( 0 => array( 'tag' => 'NavigationMode', 'value' => array( 0 => array( 'tag' => 'Title', 'value' => 'Introduction' ), 1 => array( 'tag' => 'NavigationNode', 'value' => array( 0 => array( 'tag' => 'Title', 'value' => 'Sub Intro' ) ) ) )

How to create a menu tree using HTML

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to create a menu tree using HTML. I had a search on Google, but they are providing some software to download in order to create this. But I need some script and HTML tags to do this. Can anyone help me solve this problem. Thanks in advance. 回答1: Here is something very simple to start with. http://www.dynamicdrive.com/dynamicindex1/navigate1.htm EDIT Implementing what I learned from @sushil bharwani. Here is how I found the above URL i.e. at the courtesy of @sushil bharwani http://www.google.co.in/search?q=Menu+Tree+using+UL+L&qscrl=1

Jquery tabs conflicting with revolution slider

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a page containing revolution slider and a tabs script. You can find the page here: http://lovebomb.nl/dating But somehow the scripts are conflicting with one another. This part of the revolution slider: var tpj=jQuery; tpj.noConflict(); tpj(document).ready(function() { if (tpj.fn.cssOriginal!=undefined) tpj.fn.css = tpj.fn.cssOriginal; tpj('.fullwidthbanner').revolution( { delay:9000, startwidth:1024, startheight:616, onHoverStop:"on", // Stop Banner Timet at Hover on Slide on/off thumbWidth:100, // Thumb With and

Get ul li a string values and store them in a variable or array php [closed]

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Im trying to store the string value's of a list item on my website into a variable/array in PHP to do some conditional checks/statements with them. Am having a bit off difficulty getting the list item's string value using PHP, can anybody help? This is the markup. <div class = "coursesListed" > <ul> <li><a href = "#" ><h3> Item one </h3></a></li> <li><a href = "#" ><h3> item two </h3></a></li> <li><a href = "#" ><h3> Item three </h3></a></li> </ul> </div> What i want ideally is either a variable or array that holds the values "Item

jQuery add class to current li and remove prev li when click inside li a

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: here is html: menu item menu item menu item menu item menu item if I press 'a' link it will addClass 'current' to clicked li and remove old li class? this is my try: $ ( 'ul li a' ). click ( function (){ $ ( 'ul li' ). removeClass ( 'current' ); ... don 't know here (add class to current li) ... }); 回答1: Use .parent('li') or .closest('li') to select the clicked . $ ( 'ul li a' ). click ( function () { $ ( 'ul li.current' ). removeClass ( 'current' ); $ ( this ). closest ( 'li' ). addClass ( 'current' ); }); 回答2: Use on('click') if

二级导航

ⅰ亾dé卋堺 提交于 2019-12-03 01:52:32
<!DOCTYPE html><html ><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>erjidaohang</title> <link rel="stylesheet" href="erjidaohang.css"> <script> window.onload=function () { var oUl=document.getElementById('ul1'); var aLi=oUl.children;/*请注意子节点只算第一层的,孙子节点不在子节点的范畴内。*/ for (var i=0;i<aLi.length;i++){ aLi[i].onmouseover=function () { var oSubUl=this.getElementsByTagName('ul')[0]; if (oSubUl){ oSubUl.style.display="block"; } }; /*在鼠标指针移出指定的对象时执行Javascript代码:*/ aLi[i].onmouseout=function () { var oSubul=this.getElementsByTagName('ul')[0]; if

Expand menu, show submenu

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to create an "expandable" menu. So, if a user clicks on option A two suboptions should show up. I'm trying to do something like this but in a menu... This is my code so far... <li> <a href="?op=1" data-toggle="collapse" data-target=".nav-collapse88"><i class="icon-picture icon-white"></i> Galleries</a> <div class="nav-collapse88"> <ul> <li> <a href=""><i class="icon-play"></i> Add</a> </li> <li> <a href=""><i class="icon-play"></i> Delete</a> </li> </ul> </div> </li> So when I click on galleries the options Add and Delete should

Css transition from display none to display block, navigation with subnav

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: This is what I have jsFiddle link nav . main ul ul { position : absolute ; list - style : none ; display : none ; opacity : 0 ; visibility : hidden ; padding : 10px ; background - color : rgba ( 92 , 91 , 87 , 0.9 ); - webkit - transition : opacity 600ms , visibility 600ms ; transition : opacity 600ms , visibility 600ms ; } nav . main ul li : hover ul { display : block ; visibility : visible ; opacity : 1 ; } Lorem Ipsum Dolor Sit Amet Why is there no transition? If I set nav . main ul li : hover ul { display : block ; visibility :