Search Results

Search found 3190 results on 128 pages for 'ul li'.

Page 1/128 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Keyboard selecting nested li's with jquery

    - by Joel
    I have a load of nested <ul>'s and <li>'s and I would like to be able to have a hover / selected class on an <li>, and use the keyboard up and down buttons to select up and down on the <li>s.. however they are nested and need to jump across <ul>s if necessary. For instance: <ul> <li class='cat'> cat 1 <ul> <li class='hover'>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> </ul> </li> <li class='cat'> cat 2 <ul> <li>item 5</li> <li>item 6</li> <li>item 7</li> <li>item 8</li> </ul> <ul class='subcat'> <li class='cat'> Cat 3 <ul> <li>item 9</li> <li>item 10</li> <li>item 11</li> <li>item 12</li> </ul> </li> </ul> </li> <li class='cat'> cat 4 <ul> <li>item 13</li> <li>item 14</li> <li>item 15</li> <li>item 16</li> </ul> </li> </ul> As I press the down key I wish the items to be selected in numerical order (they do not have numerical order IDs and sometimes some of them are hidden so they should be ignored. But it needs to go to the next <li> that isn't a category and set that as hover.

    Read the article

  • How to select li range and move them inside div [closed]

    - by user8012
    How can I select a range of li and move them inside div element. For example: <ul> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> </ul> If the li is more than 6 create a column like this: <ul> <li> <div class="column1"> <ul> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> </ul> </div> </li> <li> <div class="column2"> <ul> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> <li>test</li> </ul> </div> </li> </ul>

    Read the article

  • PHP function generate UL LI

    - by apis17
    hi.. i'm referring this address for function olLiTree http://stackoverflow.com/questions/753853/php-function-that-creates-a-nested-ul-li i have this array $tree = array("A"=array("B"=array("C"="C","D"="D"),"E"=array("F"="F","G"="G"))); but not able to use this function function olLiTree($tree) { echo '<ul>'; foreach($tree as $item) { if (is_array($item)) { olLiTree($item); } else { echo '<li>', $item, '</li>'; } } echo '</ul>'; } to generate <ul> <li>A</li> <li>B <ul> <li>C</li> <li>D</li> </ul> </li> <li>E <ul> <li>F </li> </ul> </li> <ul> <li>G</li> </ul> </ul> can anybody help me to fix this? thanks..

    Read the article

  • How to scroll LI items in a fixed height UL?

    - by Tahir Akram
    Here is my example HTML. And I want to have scroll for my LI items. Which are of 2 levels. Means, I want to apply class on every UL. So how can I do that. By using JQuery or CSS tweaking. PS: I am using this example. <ul id="nav" class="dropdown"> <li class="dir"> Item_Root <ul> <li class="dir"> Item_1_Level <ul> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>.... up to N items</li> </ul> </li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>.... up to N items</li> </ul> </li> </ul>

    Read the article

  • jQuery open and close nested ul nav depending on location

    - by firefusion
    I'm making a sub nav in wordpress and have a nested list style menu. An example of the HTML is below. Whichever is the current item has the li class "current_page_item". I need all child menus collapsed unless there is a current_page_item class on the parent or one of the children. <ul> <li class="current_page_item"><a href="#">Parent Item</a> <ul class="children"> <li><a href="#">Child page</a></li> <li><a href="#">Child page</a></li> <li><a href="#">Child page</a></li> <li><a href="#">Child page</a></li> </ul> </li> <li><a href="#">Parent Item</a> <ul class="children"> <li><a href="#">Child page</a></li> <li><a href="#">Child page</a></li> </ul> </li> <li><a href="#">Parent Item</a> <ul class="children"> <li><a href="#">Child page</a></li> <li><a href="#">Child page</a></li> </ul> </li> <li><a href="#">Parent Item</a></li> <li><a href="#">Parent Item</a></li> </ul> This so far, which works but i wonder if it can be improved as there is some flashing open and then closed again.... jQuery('ul.children').slideUp(); jQuery('li.current_page_item ul.children').slideDown('medium'); jQuery('li.current_page_item').parent().slideDown('medium');

    Read the article

  • A quiz with results

    - by Keon Davies
    I'm currently working on programming a quiz withe results. I've tried this: <html> <body> <h1></h1> <form> <ol> <li> How much are you willing to spend on a phone per month?</li> <ul> <li><input type = "radio" name = "q1" id="q1_1"> £5-£10.</input></li> <li><input type = "radio" name = "q1" id="q1_2"> £10-£15.</input></li> <li><input type = "radio" name = "q1" id="q1_3"> £15-£20.</input></li> <li><input type = "radio" name = "q1" id="q1_4"> £20-£25.</input></li> <li><input type = "radio" name = "q1" id="q1_5"> £25-£30.</input></li> <li><input type = "radio" name = "q1" id="q1_6"> £30-£35.</input></li> <li><input type = "radio" name = "q1" id="q1_7"> £35-£40.</input></li> </ul> <li> Are you good with technology</li> <ul> <li><input type = "radio" name = "q2" id="q2_1"> Yes.</input></li> <li><input type = "radio" name = "q2" id="q2_2"> No.</input></li> </ul> <li> Are you looking for an easy to use phone</li> <ul> <li><input type = "radio" name = "q3" id="q3_1"> Yes.</input></li> <li><input type = "radio" name = "q3" id="q3_2"> No.</input></li> </ul> <li> Are you looking for a modern type of phone?</li> <ul> <li><input type = "radio" name = "q4" id="q4_1"> Yes.</input></li> <li><input type = "radio" name = "q4" id="q4_2"> No.</input></li> </ul> <li> How big do you want the phone to be?</li> <ul> <li><input type = "radio" name = "q5" id="q5_1"> Big.</input></li> <li><input type = "radio" name = "q5" id="q5_2"> Medium.</input></li> <li><input type = "radio" name = "q5" id="q5_3"> Small.</input></li> <li><input type = "radio" name = "q5" id="q5_4"> I don't really mind.</input></li> </ul> <li> Do you care about the colour of the phone?</li> <ul> <li><input type = "radio" name = "q6" id="q6_1"> Yes.</input></li> <li><input type = "radio" name = "q6" id="q6_2"> No.</input></li> </ul> <li> Have you ever owned a phone before?</li> <ul> <li><input type = "radio" name = "q7" id="q7_1"> Yes.</input></li> <li><input type = "radio" name = "q7" id="q7_2"> No.</input></li> </ul> <li> Do you want to be able to use the phone to get out of awkward social situations?</li> <ul> <li><input type = "radio" name = "q8" id="q8_1"> Yes.</input></li> <li><input type = "radio" name = "q8" id="q8_2"> No.</input></li> </ul> <li> Do you want to be able to access the app store and download apps using your phone?</li> <ul> <li><input type = "radio" name = "q9" id="q9_1"> Yes.</input></li> <li><input type = "radio" name = "q9" id="q9_2"> No.</input></li> </ul> <li> What happened to the last phone you owned?</li> <ul> <li><input type = "radio" name = "q10" id="q10_1"> I got bored of it.</input></li> <li><input type = "radio" name = "q10" id="q10_2"> It broke.</input></li> <li><input type = "radio" name = "q10" id="q10_3"> The contract ran out.</input></li> <li><input type = "radio" name = "q10" id="q10_4"> Other.</input></li> </ul> </ol> <input type = "button" value = "Submit" onclick="getResults()"> <input type = "reset" value = "Clear"></input> <textarea id="result">The right phone for you will be displayed here.</textarea> </html> <script> function getResults() { if (document.getElementById('q1_1').checked && document.getElementById('q2_1').checked && document.getElementById('q3_1').checked && document.getElementById('q4_1').checked && document.getElementById('q5_1').checked && document.getElementById('q6_1').checked && document.getElementById('q7_1').checked && document.getElementById('q8_1').checked && document.getElementById('q9_1').checked && document.getElementById('q10_1').checked ) { document.getElementById('result').innerHTML = 'Unfortunately, the iPhone is the right phone for you.'; } } </script> </body> But it's just too long winded. Is there any other ways I can design a quiz like this but without having to write a block of code for each radio button?

    Read the article

  • Getting text values of li (even nested) in JQuery

    - by Tahir Akram
    Hi; <ul> <li class="item-i">AI</li> <li class="item-ii">AII <ul class="level-2"> <li class="item-a">A</li> <li class="item-b">B</li> <li class="item-c">C</li> </ul> </li> <li class="item-iii">III</li> </ul> How can I get values AI AII A B C III? What I tried so far is following: $(document).ready(function() { $('li').each(function(index) { alert($(this).text()); }); }); But it does not gave me required results. When it reaches "item-ii" it gave all result. I want item one by one.

    Read the article

  • move element li into ul with jquery

    - by ron
    Hi everybody i'm looking for a solution to move an element that i need to move into a .... im using jquery and i leave here the code i tried with different things but wasn't working it. this is the big menu <ul class="sf-menu"> <li><a href="">Student Centre</a> <ul> <li><a href="9">STUDENT CENTRAL WEBSITE</a></li> <li><a href="10">STUDENT CENTRAL EMAIL</a></li> <li><a href="11">CCM STUDENT SURVIAL TIPS</a></li> <li><a href="12">VET TUTTTION ASSURANSE</a></li> <li><a href="13">WHAT GOING ON AT CCM</a></li> <li><a href="14">IMPORTANT STUDENTS NOTICE</a></li> </ul> </li> <li><a href="">Research</a> <ul> <li><a href="_16">WHAT IS HOLISTIC KINESIOLOGY ?</a></li> <li><a href="_17">TRANF. CHILDREN W/ LEARNING DIFFICULTIES</a></li> <li><a href="_18">HEALING WITH HOLISTIC KINESIOLOGY</a></li> <li><a href="_19">UNDERSTANDING ASPERGER'S SYNDROME</a></li> <li><a href="_20">DAVID CORBY THE DIRECTOR OF CCM</a></li> <li><a href="_21">HELPING PEOPLE CREATE THEIR OWN MIRACLES</a></li> <li><a href="_22">MAGNESIUM AND COLLOIDAL MINERALS</a></li> <li><a href="_23">BRAIN ENERGETICS CHAKRAS AND NADIS</a></li> <li><a href="_24">KINESIOLOGY FAQ'S</a></li>' </ul> </li> <li><a href="25">Contact Us</a></li> <li><a href="26">A - Z</a></li> </ul> and i need to add this li to ul but i need to put in the second place after the first not nested <li id="faculty"> <a href="#">Faculty Courses </a> <ul> <li><a href="">INTENSE SHORT COURSES</a><ul> <li><a href="_59">CRYSTAL KINESIOLOGY ONE</a></li> <li><a href="_60">APPLIED PHYSIOLOGY</a></li> <li><a href="_61">VIBRATIONAL HEALING SYSTEMS 1</a></li> <li><a href="_62">VIBRATIONAL HEALING SYSTEMS 2</a></li> <li><a href="_63">VIBRATIONAL HEALING SYSTEMS 3</a></li> <li><a href="_64">VIBRATIONAL HEALING SYSTEMS 6</a></li> <li><a href="_65">NUTRITIONAL KINESIOLOGY</a></li> <li><a href="_66">QUANTUM HARMONICS</a></li><li><a href="_67">CHAKRA HOLOGRAM</a></li> <li><a href="_68">CLINICAL APPLICATIONS OF KINESIOLOGY</a></li> <li><a href="_69">COUNSELLING KINESIOLOGY</a></li> <li><a href="_70">HARMONISING CHI FLOW</a></li> </ul> </li> <li><a href="=53">FREE INTRUCTION COURSE DAYS</a> <ul> <li><a href="=53_56">HOLISTIC KINESIOLOGY</a></li> <li><a href="=53_57">TRANSPERSONAL COUNSELLING</a></li> <li><a href="=53_58">SHAMMANISM &amp; TRANSFORMATIONAL MASK</a></li> </ul> </li> <li><a href="=50">DIPLOMA MASK AND TRADITIONAL HEALING</a></li> <li><a href="=43">DIPLOMA TRANSPERSONAL ART THERAPY</a></li> <li><a href="=42">DIPLOMA HOLISTIC KINESIOLOGY</a></li> <li><a href="=47">ADVANCE DIPLOMA HOLISTIC KINESIOLOGY</a></li> <li><a href="=48">DIPLOMA DINAMIC AND FUNCTIONAL</a></li> <li><a href="=49">CERTIFICATE MASK AND TRADITIONAL HEALING</a></li> <li><a href="=51">DIPLOMA TRANSPERSONAL COUNSELLING</a></li> <li><a href="=52">STUDENT CLINICS</a></li> </ul> </li> please i need you help Thanks in advance

    Read the article

  • add width li's to parent ul

    - by Epco
    i would like to calculate the width of the li's for each submenu en then put in the ul element. example <ul> <li>level 1</li> <li> <ul style="widht:??;"> // total width li's added here 70px <li>level 2</li> // width of this li 20px <li>level 2</li>/ width of this li 50px </ul> </li> <li>level 1</li> <li>level 1 <ul style="widht:??;"> // total width li's added here 70px <li>level 2</li> // width of this li 20px <li>level 2</li>/ width of this li 50px </ul> </li> </ul> i have this so fare if ('#menu li:has(ul) ul'){ $('li').each(function(){ widthParentUl += $(this).outerWidth(true) }); $(this)parent.('ul').attr('style','width:' + widthParentUl +'px; display:block; background:red;'); }

    Read the article

  • set all nested li's to be width of widest li

    - by unhitched
    hey, How do I make nested li's the same width? When I use the below code each nested li is only as wide as it's text + margin. I'd like all of the li's to be as wide as the widest li under the parent ul. eg: <ul id="menu"> <li <a href="#" title="Menu a">Menu a</a></li> <li <a href="#" title="Menu b">Menu b</a></li> <li <a href="#" title="Nested Menu">Nested Menu</a> <ul> <li <a href="#" title="Menu Item">Menu Item</li> <li <a href="#" title="Long Menu Item">Long Menu Item</a></li> <li <a href="#" title="Longer Menu Item">Longer Menu Item</a></li> </ul> </li> <li <a href="#" title="Menu z">Menu z</a></li> </ul> with css: <style type="text/css" media="all"> * { padding:0; margin:0; } body, html { width: 100%; height: 100%; } #wrapper { width: 800px; height: 100%; margin: auto; } #menu { margin: 0 0 0 8px; padding: 0; font-size: 14px; font-weight: normal; } #menu ul { list-style-type:none; list-style-position:outside; position:relative; z-index:300; height: 32px; font-weight:bold; white-space: nowrap; padding:0; } #menu a {text-decoration:none; line-height: 32px; } #menu a:hover { } #menu li { float:left; position:relative; display: inline; height: 100%; list-style-type: none; padding: 0 20px; background: #ccc; } #menu ul { position:absolute; display:none; left:0px; background: #BDCCD4; width:100%; } #menu ul a, #menu li a { display: block; } #menu li ul { background: #BDCCD4; display:block; } #menu li ul a { font-weight: normal; height:auto; float:left; } #menu ul ul { padding: 0 9px; display:block; } #menu li ul li { padding: 0 9px; background: #BDCCD4; } #menu li:hover { background: #ddd; height: 32px; } #menu li li:hover, #menu li li li:hover { background: #ddd; height: 32px; } #menu li a:link, #menu li a:visited { text-decoration: none; color: #003E7E; margin: auto; }

    Read the article

  • jquery masonry on ul with nested ul

    - by Adam Wright
    I'm trying to create a footer nav of a sitemap with levels nested within each other. i want to use masonry so the padding and margin is consistant and not changed depending on nested items. its firing masonry but its adding the relative style to the nested ul if i change the masonry call to select just the first() ul then nested li appear on one line. any ideas? <div id="links"> <ul ><li class="box"><a href="/Industries.aspx" >Industries</a></li><li class="box"><a href="/Services.aspx" >Services</a></li><li class="box"><a href="/Quality---Regulatory.aspx" >Quality &amp; Regulatory</a></li><li class="box"><a href="/About.aspx" >About</a><ul ><li class="box"><a href="/About/Our-Story.aspx" >Our Story</a></li><li class="box"><a href="/About/Our-Mission.aspx" >Our Mission</a></li><li class="box"><a href="/About/Our-Core-Values.aspx" >Our Core Values</a></li></ul></li><li class="box"><a href="/News.aspx" >News</a><ul ><li class="box"><a href="/News/Events.aspx" >Events</a></li></ul></li><li class="box"><a href="/Careers.aspx" >Careers</a></li><li class="box"><a href="/Contact.aspx" >Contact</a></li><li class="box"><a href="/tests.aspx" >tests</a></li></ul> </div> <script type="text/javascript"> $('#links ul').masonry({ singleMode: true, // Disables measuring the width of each floated element. // Set to true if floated elements have the same width. // default: false columnWidth: 182, // Width in pixels of 1 column of your grid. // default: outer width of the first floated element. itemSelector: '.box:visible', // Additional selector to specify which elements inside // the wrapping element will be rearranged. // Required for Infinite Scroll with window resizing. resizeable: true, // Binds a Masonry call to window resizes // so layout appears fluid. // default: true animate: false, // Animates layout rearrangements. // default: false saveOptions: true // Masonry will use the options from previous Masonry // calls by default, so you only have to enter in options once // default: true }); </script>

    Read the article

  • IE7 li ul bug on dropdown menu

    - by Berns
    hoping one of you guys can help me please. I have a basic list menu with two dropdowns. This all works fine on all browsers except IE6 and IE7. Please take a look at my markup. <nav> <ul id="topNav" ><li id="topNavFirst"><a href="../about/about.php" id="aboutNav">About Us</a></li ><li id="topNavSecond"><a href="../people/our-people.php" id="peopleNav">Our People</a ><ul id="subList1"><li><a href="../people/mike-hadfield.php">Mike Hadfield</a></li ><li><a href="../people/karen-sampson.php">Karen Sampson</a></li ><li><a href="../people/milhana-farook.php">Milhana Farook</a></li ><li><a href="../people/kim-crook.php">Kim Crook</a></li ><li><a href="../people/amanda-lynch.php">Amanda Lynch</a></li ><li><a href="../people/gideon-scott.php">Gideon Scott</a></li ><li><a href="../people/paul-fuller.php">Paul Fuller</a></li ><li><a href="../people/peter-chaplain.php">Peter Chaplain</a></li ><li><a href="../people/laura-hutley.php">Laura Hutley</a></li ></ul ></li ><li id="topNavThird"><a href="../services/our-services.php" id="servicesNav">Our Services</a ><ul id="subList2"><li><a href="../services/company-and-commercial.php">Company &amp; Commercial</a></li ><li><a href="../services/employment.php">Employment</a></li ><li><a href="../services/civil-litigation.php">Civil Litigation</a></li ><li><a href="../services/debt-recovery.php">Debt Recovery</a></li ><li><a href="../services/conveyancing.php">Conveyancing</a></li ><li><a href="../services/commercial-property.php">Commerical Property</a></li ><li><a href="../services/wills-and-probate.php">Wills &amp; Probate</a></li ><li><a href="../services/family.php">Matrimonial &amp; Family</a></li ></ul ></li ><li><a href="../news/news.php" id="newsNav">News</a></li ><li><a href="../careers/careers.php" id="careersNav">Careers</a></li ><li><a href="../contact/contact.php" id="contactNav">Contact</a></li ></ul><!-- /topNav --> </nav>? and the css a {text-decoration:none;} #topNav { float:right; height:30px; margin:0; font-size:12px; } #topNav li { display:inline; float:left; list-style:none; color:#666; border-left: 1px solid #666; padding: 0 3px 0 3px; position:relative; } #topNav ul a { white-space:nowrap; } #topNav li a:hover { border-bottom:2px solid #369; } #topNavSecond a:hover { border-bottom:2px solid transparent !important; } #topNavFirst { border-left: 1px solid transparent !important; } /*****OUR-PEOPLE DROPDOWN*****/ #topNav ul{ background:#fff; border:1px solid #666; border-top:0px solid transparent; border-bottom:2px solid #666; list-style:none; position:absolute; left:-9999px; width:100px; text-align:left; padding:5px 0 5px 0px; margin:0 0 0 -4px; z-index:10; -webkit-box-shadow: 1px 1px 1px #666; -moz-box-shadow: 1px 1px 1px #666; box-shadow: 1px 1px 1px #666; vertical-align: bottom; } #topNav ul li{ display:block; border-left:0px; margin-bottom: 0px; padding:0; vertical-align: bottom; } #topNav ul a{ padding:0 0 0 5px; } #topNav li:hover ul{ left:auto; } #topNav li:hover a { color:#369; } #topNav li:hover ul a{ text-decoration:none; color:#666; } #topNav li:hover ul li a:hover{ color:#fff;; width:100%; border-bottom:0px solid transparent !important; } #topNav ul li:hover { background:#369; display: block; } #topNav ul li a { display: block; padding:0 0 0 4px; } /************/ /*****OUR-SERVICES DROPDOWN*****/ #topNavThird a:hover { border-bottom:2px solid transparent !important; } #topNavThird ul{ /*background:#fff url(images/service-ul-bg.png) no-repeat;*/ width:135px !important; /*margin-left:120px !important;*/ }? here it is working perfectly http://jsfiddle.net/BcWd9/ here is a screen shot of how it looks in IE7. hadfield.andymcnallydesign.co.uk/images/ie7-error.jpg as you can see the ul is appearing to the right of the li and not the left and it is overlaying the top list. I've tried removing white space, but no luck. Any ideas? If one of you can help it would be much appreciated.

    Read the article

  • RegEx for the <li></li> tags

    - by Abu
    Hi All, i am working on the C# WinForm application. In that application, i have snippet like this: <ul> <li>abc <li>bbc <li>xyz <li>pqr </li></li></li></li> </ul> but, i want to get output like.. <ul> <li>abc</li> <li>bbc</li> <li>xyz</li> <li>pqr</li> </ul> Is there any method using which this thing can be done? Can anybody suggest me any RegEx for this problem? Thanks. Regards.

    Read the article

  • Regular expression to convert ul to textindent and back, with a different attribute value for first

    - by chapmanio
    Hi, This is a related to a previous question I have asked here, see the link below for a brief description as to why I am trying to do this. Regular expression from font to span (size and colour) and back (VB.NET) Basically I need a regex replace function (or if this can be done in pure VB then that's fine) to convert all ul tags in a string to textindent tags, with a different attribute value for the first textindent tag. For example: <ul> <li>This is some text</li> <li>This is some more text</li> <li> <ul> <li>This is some indented text</li> <li>This is some more text</li> </ul> </li> <li>More text!</li> <li> <ul> <li>This is some indented text</li> <li>This is some more text</li> </ul> </li> <li>More text!</li> </ul> Will become: <textformat indent="0"> <li>This is some text</li> <li>This is some more text</li> <li> <textformat indent="20"> <li>This is some indented text</li> <li>This is some more text</li> </textformat> </li> <li>More text!</li> <li> <textformat indent="20"> <li>This is some indented text</li> <li>This is some more text</li> </textformat> </li> <li>More text!</li> </textformat> Basically I want the first ul tag to have no indenting, but all nested ul tags to have an indent of 20. I appreciate this is a strange request but hopefully that makes sense, please let me know if you have any questions. Thanks in advance.

    Read the article

  • dynamic ul with sub-levels

    - by Y.G.J
    i have this recursive code <ul> <% sql="SELECT * FROM cats ORDER BY orderid " rs.Open sql,Conn dim recArray If Not rs.EOF Then recArray = rs.getRows() dim i for i=0 to uBound(recArray,2) if recArray(1,i)=0 then call showMessage(i) end if next End If function showMessage(index) %><li><%=recArray(2,index)%></li><% for a=0 to uBound(recArray,2) if recArray(1,a) = recArray(0,index) Then %><ul><% call showMessage(a) %></ul><% end if next %></li><% end function %> </ul> inside the loop in the function i have the for the sub(s) but after each line of li it will close the ul how can i have that dynamic and to have the output like this <ul> <li></li> <li></li> <li> <ul> <li></li> <li></li> <li></li> </ul> </li> <li></li> </ul> and not like this <ul> <li></li> <li></li> <li> <ul><li></li></ul> <ul><li></li></ul> <ul><li></li></ul> </li> <li></li> </ul>

    Read the article

  • How to add class to selective <li> in a generated menu

    - by Vikram
    Hi I am looking for a solution to add a class to every list item <li> which has a child item with a class of <span class="separator"> and a different class to <li> with an anchor link. I use Joomla and the menu is being generated somewhat like this: <ul class="menu"> <li class="item1"><a href="<!-- link goes here -->"><span>Home</span></a></li> <li class="parent item59"><span class="separator"><span>Demo</span></span></li> <li class="item62"><a href="<!-- link goes here -->"><span>Article</span></a></li> <li id="current" class="parent active item27"><a href="<!-- link goes here -->"><span>CMS</span></a> <ul> <li class="item50"><a href="<!-- link goes here -->"><span>The News</span></a></li> <li class="item48"><a href="<!-- link goes here -->"><span>Web Links</span></a></li> <li class="item65"><span class="separator"><span /></span></li> <li class="item49"><a href="<!-- link goes here -->"><span>News Feeds</span></a></li> <li class="item66"><span class="separator"><span /></span></li> <li class="item67"><span class="separator"><span /></span></li> <li class="item68"><span class="separator"><span /></span></li> </ul> </li> <li class="item71"><span class="separator"><span>Help</span></span></li> </ul> What I want is to add class "anclink" or "seplink" to the <li> depending on their child item so that the final output looks like below. <ul class="menu"> <li class="item1 anclink"><a href="<!-- link goes here -->"><span>Home</span></a></li> <li class="parent item59 seplink"><span class="separator"><span>Demo</span></span></li> <li class="item62 anclink"><a href="<!-- link goes here -->"><span>Article</span></a></li> <li id="current" class="parent active item27" anclink><a href="<!-- link goes here -->"><span>CMS</span></a> <ul> <li class="item50 anclink"><a href="<!-- link goes here -->"><span>The News</span></a></li> <li class="item48 anclink"><a href="<!-- link goes here -->"><span>Web Links</span></a></li> <li class="item65 seplink"><span class="separator"><span /></span></li> <li class="item49 anclink"><a href="<!-- link goes here -->"><span>News Feeds</span></a></li> <li class="item66 seplink"><span class="separator"><span /></span></li> <li class="item67 seplink"><span class="separator"><span /></span></li> <li class="item68 seplink"><span class="separator"><span /></span></li> </ul> </li> <li class="item71 seplink"><span class="separator"><span>Help</span></span></li> </ul> How can I achieve this using PHP or even a jQuery solution will be fine. Kindly help.

    Read the article

  • Populating a UL with Jquery

    - by RachelGatlin
    Hi Guys, I'm a little bit stumped with this UL I'm building. I've been able to populate the list no problem but it's all messed up when it comes to formatting. Here's my script: $.ajax({ type: "GET", url: "/shop/assets/xml/tonneau_makes.xml", dataType: "xml", success: function(xml) { var selectInfo = $("li.selectMake"); $(xml).find('option').each(function(){ var make = $(this).attr('make'); $("li.selectMake").before("<li>"+make+"</li>"); }); } }); It's working beautifully. however when I go to look at it on my page and view the selection source it looks like this: <ul id="MakeList"> <li>CHEVROLET</li> <li>VINTAGE CHEVY</li> <li>DODGE</li> <li>VINTAGE FORD</li> <li>FORD</li> <li>HONDA</li> <li>HUMMER</li> <li>ISUZU</li> <li>LINCOLN</li> <li>MAZDA</li> <li>MITSUBISHI</li> <li>NISSAN</li> <li>SUZUKI</li> <li>TOYOTA</li> <li class="selectMake"></li> So I guess it is working, but it's not formatting the way I want it to. I want it to stop at Honda and form a new list. Right now it's extending beyond my div. My html is set up like this: <ul id="MakeList"> <li class="selectMake"></li> </ul> It's just an empty ul and li (note, all li's are supposed to have that class) So not only do I need to figure out what I'm doing wrong, but I'm not sure how to get it to do what I want. I hope that all made sense! Thanks everybody!

    Read the article

  • Suckerfish Menu Not Working. Nested UL not displaying block

    - by Brett
    I'm going out of my mind with this one. I'm trying to build a suckerfish css drop down menu. I have the first level working ok but I can't get the nested ul (under the Glossary tab) to display in block format and show my a background color. I've been at this for three days and I'm about to go crazy. If anyone can help I'd really appreciate it. You can see it here: www.brettlockhart.com/blast/ body { min-width:640px; margin:0px; padding:0px 40px 0px 40px; background-color:#eee; } /*Nav One styles*/ nav#navOne ul { width:100%; min-width:640px; height:25px; margin:0px auto; padding:0px; background-image:url(/blast/images/navOneBg.png); border-radius:0px 0px 8px 8px; text-align:right; float:right; } nav#navOne ul li { position:relative; display:inline; margin: 0px 0px 0px 10px auto; padding:3px 0px; border-left:1px #0b4c8f solid; line-height:23px; } nav#navOne ul li:last-child { margin-right:10px; } .arrowDown { margin: auto; font-family:Tahoma, Geneva, sans-serif; font-size:.7em; color:#FFF; padding: 0px 5px 0px 0px; } nav#navOne ul li a { margin: 0px auto; padding: 4px 10px 4px 15px; font-family:Tahoma, Geneva, sans-serif; font-size:.7em; color:#FFF; border-left:1px #5d9ee0 solid; text-decoration:none; line-height:23px; } /*Nav One rollover*/ nav#navOne ul li ul { display:none; background-image:none; } nav#navOne ul li:hover ul { display:block !important; } nav#navOne ul li:hover nav#navOne ul li ul li { background-color:#69C !important; left:0px; top:26px; z-index:10; } h1 { float:left; width:158px; text-indent:-9999px; background-image:url(/blast/images/logo.png); background-repeat:no-repeat; } #search { float:right; width:280px; margin:0px; padding:0px; } /*Nav Two styles*/ nav#navTwo h3 { display:inline; } nav#navTwo ul { width:100%; height:50px; margin:0 auto; padding:0px; border:1px solid red; clear:both; } nav#navTwo ul li { display:inline; border: 1px solid green; margin-top:20px; } <header> <nav id="navOne"> <ul> <li><a href="#">Sign In</a></li> <li><a href="#">Register</a></li> <li><a href="#">Print Page</a></li> <li id="glossary"><a href="#">Glossary</a> <ul> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> </ul> </li> <li><a href="#">Text Size: A A A</a></li> <li><a href="#">Select Your Location</a> <span class="arrowDown">&#x2C5;</span></li> </ul> </nav><!--/navOne--> <h1>Logo</h1> <div id="search"> <form action="?" method="get"> <fieldset> <input type="text" id="searchField"> <input type="submit" id="searchSubmit" value="Submit"> Search:<label for="radioHere">here</label> <input type="radio" id="radioHere" name="here" value="here"> <label for="radioWeb">the web</label> <input type="radio" id="radioWeb" name="the web" value="the web"> </fieldset> </form> </div><!--/search--> <nav id="navTwo"> <ul> <li><h3>Residential:</h3></li> <li>TV</li> <li>Internet</li> <li>Phone</li> <li>Pricing</li> <li class="navTwoSelected">Music</li> <li>Order</li> <li>Billing</li> <li>Support</li> <li>|</li> <li>Business</li> <li>About Us</li> </ul> </nav><!--/navTwo--> <nav id="navThree"> <ul> <li>Today</li> <li>Watch</li> <li>Surf</li> <li>Play</li> <li class="navThreeSelected">Listen</li> <li>Learn</li> <li>Local</li> </ul> <h3>Tools:</h3> <ul> <li>Webmail</li> <li>Account</li> <li>Billing</li> <li>Order Services</li> </ul> </nav><!--/navThree--> <nav id="navFour"> <h3>Your are here:</h3> <ul id="breadcrumbs"> <li>Residential ></li> <li>My Place ></li> <li>Listen ></li> <li class="currentPage">Music</li> </ul> </nav><!--/navFour--> </header>

    Read the article

  • wrap 6 li elements togheter on a long list

    - by blackhandr
    I have a long list like this <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> <li>item 6</li> <li>item 7</li> <li>item 8</li> <li>item 9</li> <li>item 10</li> <li>item 11</li> ... </ul> and i want somehow to wrap some div around like this: <ul> <div> <li>item 1</li> ... <li>item 6</li> </div> <div> <li>item 7</li> ... <li>item 12</li> </div> <div> ... </div> </ul> how can accomplish this? :-\ i tryed .after('</div><div>'); but is not working, it adds like this <div></div>

    Read the article

  • wrap 6 li elements together on a long list

    - by blackhandr
    I have a long list like this: <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> <li>item 6</li> <li>item 7</li> <li>item 8</li> <li>item 9</li> <li>item 10</li> <li>item 11</li> ... </ul> and I want to somehow wrap some divs around them like this: <ul> <div> <li>item 1</li> ... <li>item 6</li> </div> <div> <li>item 7</li> ... <li>item 12</li> </div> <div> ... </div> </ul> How can I accomplish this? I tryed .after('</div><div>'); but it's not working, it adds a <div></div>.

    Read the article

  • li element background colors and overflow scrolling

    - by user17753
    I created a simple html source, and applied a small CSS style sheet to it: html { width: 100%; } body { font-family: Calibri, Tahoma, Geneva, sans-serif; padding: 20px; } pre { padding: 0; margin: 0 auto; border: 1px solid #888; font-family: Menlo,Monaco,Consolas,monospace; color: #000; width: 80%; overflow: auto; } pre li { white-space: pre; } ol { margin-top: 0; margin-bottom: 0; /* IE indents via margin-left */ color: #979797; background: #E3E3E3; } .li1 { background: #F5F5F5 } .li2 { background: #eee } I have an ordered list inside a pre-formatted tag. Every other list element is either given the class attribute li1 or li2 (the purpose of which is to alternate the colors). The list elements need the white-space: pre because the white space before and after the text node is important. The pre is to be 80% of the containing element (which ends up being 80% of the window's width). In the event of overflow in the x dimension, I want scrolling. I did all this in the above CSS, and it almost works. The issue I am having is that the background colors of the list elements don't extend with the content. They seem to be capped to the original width of the pre and/or ol element as demonstrated in the following picture where I scroll all the way right as possible: I tinkered with the CSS for a while, but I cannot determine the root cause for this or the fix. Looking for some advice on this one, thanks. Complete source with the issue is as below, NOTE: to would-be editors of the below code the pre element is intended to be on a single line as it's pre-formatted text, and formatting it otherwise would change things. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Test Site</title> <style type="text/css"> html { width: 100%; } body { font-family: Calibri, Tahoma, Geneva, sans-serif; padding: 20px; } pre { padding: 0; margin: 0 auto; border: 1px solid #888; font-family: Menlo,Monaco,Consolas,monospace; color: #000; width: 80%; overflow: auto; } pre li { white-space: pre; } ol { margin-top: 0; margin-bottom: 0; /* IE indents via margin-left */ color: #979797; background: #E3E3E3; } .li1 { background: #F5F5F5 } .li2 { background: #eee } </style> </head> <body> <pre class="php"><ol><li class="li1">pre a &#123; text-decoration: none &#125;</li><li class="li2">pre a:hover &#123; background: #C8C8C8 }</li><li class="li1">pre li &#123; white-space: pre; &#125;</li><li class="li2">&nbsp;</li><li class="li1">.php ol &#123; margin-top: 0; margin-bottom: 0; /* IE indents via margin-left */</li><li class="li2"> color: #979797; background: #E3E3E3; }</li><li class="li1">&nbsp;</li><li class="li2">&nbsp;</li><li class="li1">&nbsp;</li><li class="li2">.php .li1 &#123; background: #F5F5F5 }</li><li class="li1">.php .li2 &#123; background: #eee }</li><li class="li2">&nbsp;</li><li class="li1">&nbsp;</li><li class="li2">.php .st0 &#123; color: #C0C } /* string content */</li><li class="li1">.php .st_h &#123; color: #F0C } /* string content single quoted */</li><li class="li2">.php .sy0 &#123; color: #000 } /* semi-colon, operators */ </li><li class="li1">.php .br0 &#123; color: #000 } /* parens */</li><li class="li2">.php .kw2 &#123; color: #00F } /* php tags */</li><li class="li1">.php .sy1 &#123; color: #00F } /* php tags */</li><li class="li2">.php .nu0 &#123; color: #F00 } /* numbers */</li><li class="li1">.php .kw3 &#123; color: #096 } /* core language functions */</li><li class="li2">.php .re0 &#123; color: #09F; font-weight: bold; } /* variables */</li><li class="li1">.php .kw1 &#123; color: #069; font-weight: bold; } /* control statements? */</li><li class="li2">.php .kw4 &#123; color: #069; font-weight: bold; } /* bool? */</li><li class="li1">.php .co1 &#123; color: #FF8400 } /* Forward slash comments */</li></ol></pre> </body> </html>

    Read the article

  • Stretch UL to fill the entire DIV

    - by Interfaith
    There is a similar post: Stretch horizontal ul to fit width of div But mine is a little bit tricky, as I have tried the above example but failed. My code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-… <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <script type='text/javascript' src='https://ajax.googleapis.com/ajax/li… <script> function mainmenu(){ $(" #nav ul ").css({display: "none"}); // Opera Fix $(" #nav li").hover(function(){ $(this).find('ul:first').css({visibi… "visible",display: "none"}).show(400); },function(){ $(this).find('ul:first').css({visibi… "hidden"}); }); } $(document).ready(function(){ mainmenu(); }); </script> <style> body{ font-size:0.85em; font-family:Verdana, Arial, Helvetica, sans-serif; } #nav, #nav ul{ margin:0; padding:0; list-style-type:none; list-style-position:outside; position:relative; line-height:1.5em; display: table; width: 100%; } #nav a{ display:block; padding:10px 15px 10px 15px; border:1px solid #fff; color:#fff; text-align: center; margin:0; text-decoration:none; background: #C34328; border-top:1px solid #EF593B; -moz-box-shadow:0px 3px 4px #591E12 inset; -webkit-box-shadow:0px 3px 4px #591E12 inset; -box-shadow:0px 3px 4px #591E12 inset; } #nav a:hover{ background-color:#fff; color:#333; } #nav li{ float:left; position:relative; } #nav ul { position:absolute; display:none; width:12em; top:3.2em; } #nav li ul a{ width:12em; height:auto; float:left; } #nav ul ul{ top:auto; } #nav li ul ul { left:12em; margin:0px 0 0 10px; } </style> </head> <body> <div style="width: 980px; border: 1px black solid;"> <ul id="nav"> <li><a href="#">Find a Doctor</a></li> <li><a href="#">Why Interfaith</a></li> <li><a href="#">For Patients & Visitors</a> <ul> <li><a href="#">3.1 jQuery</a></li> <li><a href="#">3.2 Mootools</a></li> <li><a href="#">3.3 Prototype</a></li> </ul> </li> <li><a href="#">Medical Services</a> <ul> <li><a href="#">Behavioral Health</a></li> <li><a href="#">Clinical Laboratory</a></li> <li><a href="#">Dentistry</a></li> <li><a href="#">Emergency</a></li> <li><a href="#">Gynecology</a></li> <li><a href="#">Medicine</a></li> <li><a href="#">Pastoral</a></li> <li><a href="#">Pediatrics</a></li> <li><a href="#">Physical Medicine & Rehab</a></li> </ul> </li> <li><a href="#">Medical Trainings</a> <ul> <li><a href="#">Medical Training</a></li> <li><a href="#">Behavioral Health</a></li> <li><a href="#">Predoctoral Externship</a></li> <li><a href="#">Podiatric Residency</a></li> <li><a href="#">Dental Residency</a></li> <li><a href="#">Pulmonary Medicine</a></li> </ul> </li> <li><a href="#">Contact</a></li> </ul> </div> </body> </html> Can someone tell me where I have to edit to complete the code? Thanks

    Read the article

  • Menu widget - no jQuery nor Javascript required - pure CSS

    - by Renso
    Goal: Create a menu widget that does not require any javascript, extremely lightweight, very fast, soley based on CSS, compatible with FireFox and Chrome. Issues: May have some rendering issues in some versions of IE, sorry :-) Instruments: css file html with specific menu format jQuery-ui library - optional if you want to use your own images/colors Implementation Details: HTML: <div id="header">   <div id="header_Menubar">     <ul class="linkList0 ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">         <li class="first more ui-state-default ui-corner-top ui-tabs-selected"><a title="Home" href="/Home">Home</a>             <ul class="linkList01 ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">                 <li class="ifirst ui-state-default ui-corner-top"><abbr title="Go Home"></abbr><a title="Home" href="/Home">Home</a></li>             </ul>         </li>         <li class="more ui-state-default ui-corner-top ui-tabs-selected"><a title="Menu 2" href="/Menu2a">Menu 2</a>             <ul class="linkList01 ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">                 <li class="ifirst ui-state-default ui-corner-top"><abbr title="Menu 2 a"></abbr><a title="Menu 2 a" href="/Menu2a">Menu 2 a</a></li>                 <li class="ilast ui-state-default ui-corner-top"><abbr title="Menu 2 b"></abbr><a title="Menu 2 b" href="/Menu2b">Menu 2 b</a></li>             </ul>         </li>         <li class="more red ui-state-default ui-corner-top ui-tabs-selected"><a title="Menu 3" href="/Menu3 d">Menu 3</a>             <ul class="linkList01 ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">                 <li class="ifirst ui-state-default ui-corner-top"><abbr title="Menu 3 a"><a title="Menu 3 a" href="/Menu3a">Menu 3 a</a></abbr></li>                 <li class="ui-state-default ui-corner-top"><abbr title="Menu 3 b"><a title="Menu 3 b" href="/Menu3b">Menu 3 b</a></abbr></li>                 <li class="ui-state-default ui-corner-top"><abbr title="Menu 3 c"><a title="Menu 3 c" href="/Menu3c">Menu 3 c</a></abbr></li>                 <li class="ilast ui-state-default ui-corner-top"><abbr title="Menu 3 d"><a title="Menu 3 d" href="/Menu3d">Menu 3 d</a></abbr></li>             </ul>         </li>     </ul>     </div> </div> CSS: /*    =Menu     -----------------------------------------------------------------------------------------    */ #header #header_Menubar {     margin: 0;     padding: 0;     border: 0;     width: 100%;     height: 22px; } #header {     background-color: #99cccc;     background-color: #aaccee;     background-color: #5BA3E0;     background-color: #006cb1; } /* Set menu bar background color     */ #header #header_Menubar {     background-attachment: scroll;     background-position: left center;     background-repeat: repeat-x; } /*    Set main (horizontal) menu typology    */ #header .linkList0 {     padding: 0 0 1em 0;     margin-bottom: 1em;     font-family: 'Trebuchet MS', 'Lucida Grande',           Verdana, Lucida, Geneva, Helvetica,           Arial, sans-serif;     font-weight: bold;     font-size: 1.085em;     font-size: 1em; } /*    Set all ul properties    */ #header .linkList0, #header .linkList0 ul {     list-style: none;     margin: 0;     padding: 0;     list-style-position: outside; } /*    Set all li properties    */ #header .linkList0 > li {     float: left;     position: relative;     font-size: 90%;     margin: 0 0 -1px;     width: 9.7em;     padding-right: 2em;     z-index: 100;    /*IE7:    Fix for IE7 hiding drop down list behind some other page elements    */ } /*    Set all li properties    */ #header .linkList01 > li {     width: 190px; } #header .linkList0 .linkList01 li {     margin-left: 0px; } /*    Set all list background image properties    */ /*#header .linkList0 li a {     background-position: left center;     background-image: url(  '../Content/Images/VerticalButtonBarGradientFade.png' );     background-repeat: repeat-x;     background-attachment: scroll; }*/ /*    Set all A ancor properties    */ #header .linkList0 li a {     display: block;     text-decoration: none;     line-height: 22px; } /*    IE7: Fix for a bug in IE7 where the margins between list items is doubled - need to set height explicitly    */ *+html #header .linkList0 ul li {     height: auto;     margin-bottom: -.3em; } /*    Menu:    Set different borders for different nested level lists     --------------------------------------------------------------    */ #header .linkList0 > li a {     border-left: 10px solid Transparent;     border-right: none; } #header .linkList0 > li a {     border-left: 0px;     margin-left: 0px;     border-right: none; } #header .linkList0 .linkList01 > li a {     border-left: 8px solid #336699;     border-right: none;     border: 1px solid Transparent;     -moz-border-radius: 5px 5px 5px 5px;     -moz-box-shadow: 3px 3px 4px #696969; } #header .linkList0 .linkList01 .linkList001 > li a {     border-left: 6px solid #336699;     border-right: none;     border: 1px solid Transparent;     -moz-border-radius: 5px 5px 5px 5px;     -moz-box-shadow: 3px 3px 4px #696969; } #header .linkList0 .linkList01 .linkList001 .linkList0001 > li a {     border-left: 4px solid #336699;     border-right: none;     border: 1px solid Transparent;     -moz-border-radius: 5px 5px 5px 5px;     -moz-box-shadow: 3px 3px 4px #696969; }     /*    Link and Visited pseudo-class settings for all lists (ul)    */ #header .linkList0 a:link, #header .linkList0 a:visited {     display: block;     text-decoration: none;     padding-left: 1em; } /*    Hide all the nested/sub menu items    */ #header .linkList0 ul {     display: none;     padding: 0;     position: absolute;    /*Important: must not impede on other page elements when drop down opens up    */ } /*    Hide all detail popups    */ #header .detailPopup {     display: none; } /*    Set the typology of all sub-menu list items li    */ /*#header .linkList0 ul li {     background-color: #AACCEE;     background-position: left center;     background-image: url(  '../Content/Images/VerticalButtonBarGradientFade.png' );     background-repeat: repeat-x;     background-attachment: scroll; }*/ #header .linkList0 ul li.more {     background: Transparent url('../Content/Images/ArrowRight.gif') no-repeat right center; } /*    Header list's margin and padding for all list items    */ #header .linkList0 ul li {     margin: 0 0 0 1em;     padding: 0; } #header .linkList01 ul li {     margin: 0;     padding: 0;     width: 189px; } /*    Set margins for the third li sibling (Plan a Call) to display to the right of the parent menu     to avoid the sub-menu overlaying the menu items below    */ #header .linkList0 li.more .linkList01 li.more > ul.linkList001 {     margin: -1.7em 0 0 13.2em;    /*Important, must be careful, if tbe EM since gap increases too much bewteen nested lists the gap will make the nested-list collapse prematurely    */ } /*    Set right hand arrow for list items with sub-menus (class-more)    */ #header li.more {     background: Transparent url('../Content/Images/ArrowRight.gif') no-repeat right center;     padding-right: 48px; } /*    Menu:    Dynamic Behavior of menu items (hover, visted, etc)     -----------------------------------------------------------    */ #header .linkList0 li a:link, #header .linkList01 li a:link {     display: block; } #header .linkList0 li a:visited, #header .linkList01 li a:visited {     display: block; } #header .linkList0 > li:hover { } #header .linkList01 > li:hover a ,#header .linkList001 > li:hover a {     text-decoration: underline; } #header .linkList0 > li abbr:hover span.detailPopup {     display: block;     position: absolute;     top: 1em;     left: 17em;     border: double 1px #696969;     border-style: outset;     width: 120%;     height: auto;     padding: 5px;     font-weight: 100; } #header .linkList0 > li:hover ,#header .linkList0 .linkList01 > li:hover { } #header .linkList0 .linkList01 .linkList001 > li:hover { } #header .linkList0 .linkList01 .linkList001 .linkList0001 > li:hover { } /*    Display the hidden sub menu when hovering over the parent ul's li    */ #header .linkList0 li:hover > ul {     display: block; } /*    Display the hidden sub menu when hovering over the parent ul's li    */ #header .linkList0 .linkList01 li:hover > ul {     display: block;         background: -moz-linear-gradient(top, #1E83CC, #619FCD);     /* Chrome, Safari:*/     background: -webkit-gradient(linear,                 center top, center bottom, from(#1E83CC), to(#619FCD)); } /*    Display the hidden sub menu when hovering over the parent ul's li    */ #header .linkList0 .linkList01 .linkList001 li:hover > ul {     display: block; } /*    Set right hand arrow for list items with sub-menus (class-more) on hover    */ #header li.more:hover { } Also some CSS for global settings that will affect this menu, you of course will have some other styling, but included it here so you can see how/why some css properties were set here: /* Neutralize styling:    Elements we want to clean out entirely: */ html, body {     margin: 0;     padding: 0;     font: 62.5%/120% Verdana, Arial, Helvetica, sans-serif; } /* Neutralize styling:    Elements with a vertical margin: */ h1, h2, h3, h4, h5, h6, p, pre, blockquote, ul, ol, dl, address {     margin: 0;    /*    most browsers set some default value that is not shared by all browsers    */     padding: 0;        /*    some borowsers default padding, set to 0 for all    */ } /* Apply left margin:    Only to the few elements that need it: */ li, dd, blockquote {     margin-left: 1em; }

    Read the article

  • Wrap all created li-elments after click

    - by user317919
    $('input[name="iplus"]').click(function() { $("#billsumary").append("<li>Test</li>"); }); Hi, i append a li-elemnt on every click. Now I like to wrap all those created li-elements into an ol-element but not each created one but all of them together. sample html output: <div id='billsumary'> <ol> <li>Test</li> <li>Test</li> <li>Test</li> ... <li>Test</li> </ol> </div>

    Read the article

  • Showing right sub-ul of parent ul menu

    - by Micke
    Hello, i have this html menu: <ul id='main'> <li class='active current' id='lighty'> <a href='/'>Lighty</a> <ul> <li class='sub'> <a href='/'>Hem</a> </li> </ul> </li> <li id='community'> <a href='/community'>Community</a> </li> </ul> And this jquery: $("#menu ul > li").mouseenter(function(){ id = $(this).attr("id"); $("#menu #main li").removeClass("active"); $(this).addClass("active"); }).mouseleave(function(){ id = $(this).attr("id"); menu.timers[id] = setTimeout(function(){$("#menu #main li#"+id).removeClass("active");}, 2000); }); What i am trying to acomplish is that when i hover one of the li's in the main ul the child ul of that li should be displayed. and when i move the mouse out of the li or the child ul the menu should be visible for 2 seconds. It works through the main li button but if on the child ul and move out it just disapears, it doesnt wait for two seconds. The waiting two seconds is so you can go in to the menu if you accidentaly move the mouse out of it. Can anybody help me to fix this error? Maybe you have a better solution? Here is also a screenshot on how the menu looks if it helps: screen shot under or click here

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >