Search Results

Search found 5382 results on 216 pages for 'href'.

Page 8/216 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to get the second element using jquery

    - by Jesse
    Using this jquery code I am trying to change the display from none to block for the second ul under Sale which is under Belts (It has a belts-1 href). The below code should be accessing the second element but its not. What am I doing wrong? $currentCategory = "Belts"; $(".sideCatMenu a:contains('" + currentCategory + "') ul").next(ul).eq(2).css('display', 'block'); I am searching this list <li class="active"><a href="/sale/" class="parentSide">Sale</a><ul style="display: block;" class="subcat"> <li><a href="/accessories-3/">Accessories</a><ul style="display: none;"> <li><a href="/bags-1/">Bags</a></li> <li><a href="/wristbands/">Wristbands</a></li> <li><a href="/dog-collars/">Dog Collars</a></li> <li><a href="/wallets/">Wallets</a></li> </ul> </li> <li><a href="/ten-dollar-buckles/">Ten Dollar Buckles</a></li> <li><a href="/belts-1/">Belts</a><ul style="display: none;"> <li><a href="/28-belts/">28" Belts</a></li> <li><a href="/30-belts/">30" Belts</a></li> <li><a href="/32-belts/">32" Belts</a></li> <li><a href="/34-belts/">34" Belts</a></li> <li><a href="/36-belts/">36" Belts</a></li> <li><a href="/38-belts/">38" Belts</a></li> <li><a href="/40-belts/">40" Belts</a></li> <li><a href="/42-belts/">42" Belts</a></li> <li><a href="/44-belts/">44" Belts</a></li> <li><a href="/46-belts/">46" Belts</a></li> <li><a href="/48-and-larger-belts/">48" and Larger Belts</a></li> </ul> </li> </ul> </li>

    Read the article

  • jquery .hide() bug in safari

    - by phil crowe
    ive been having issues with this hide bug thats only affecting safari. This is a simple vertical scroller that hides the first element in the list then shows the last. and works in everything apart from safari. the problem seems to be that the divs im working with here share the same class but have unique ids like #mycollectioncomment1, #mycollectioncomment2, #mycollectioncomment3 etc... however hiding just one of these divs hides all the other divs that share the same class. Ive tried .fadeOut(0) that everyone suggests as the work around but it just doesnt work here. var commentListCount = $(".myCollectionLatest").size(); var mycollclickCount = 0; var showingcomments = 5; if ($('.licomment').size() > 0) { showingcomments = 4; //alert("this"); } if ($('.lookInSeasonList').size() > 0) { showingcomments = 5; } if ($('.lookDescMiddle').size() > 0) { showingcomments = 8; } if ($('.MyCollectionsCollectionHolder').size() > 0) { showingcomments = 5; } // if (commentListCount > 5) { $(".myCollectionLatest").hide(); for (i = 0; i < showingcomments; i++) { $("#mycollectioncomment" + i).show(); } $('#mycolldown').click(function () { var element1, element2; if (showingcomments <= commentListCount) { mycollclickCount++; element1 = $("#mycollectioncomment" + mycollclickCount.toString()); element2 = $("#mycollectioncomment" + showingcomments.toString()); element1.closest('.licomment').hide(); element2.closest('.licomment').show(); showingcomments++; } }); $('#mycollup').click(function () { if (showingcomments <= 5) { } else { $("#mycollectioncomment" + mycollclickCount.toString()).show(); $("#mycollectioncomment" + mycollclickCount.toString()).closest('.licomment').show(); mycollclickCount--; showingcomments--; $("#mycollectioncomment" + showingcomments.toString()).hide(); $("#mycollectioncomment" + showingcomments.toString()).closest('.licomment').show(); } }); ---html markup --- <div style="width:260px; height:975px; float:left; border-right:solid 1px #e70079; border-bottom:solid 1px #e70079; border-left:solid 1px #e70079; margin-top:180px;"> <h2 align="center"> <br /> COLLECTION LATEST </h2> <img src="/images/my-collection/black-up.jpg" id="mycollup" /><ul><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment1"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=6855"><img src="/media/6855/makeuo_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=6855" class="usernamelinkdiv">CHARLOTTE</a> SAID ABOUT <span class="pinkTxt"><br /><a href="/products/face/powder/pressed-powder.aspx">PRESSED POWDER</a></span></b><p>put this on after foundation. its the best cover powder + re... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=6855"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment2"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=6331"><img src="/media/6331/26462_1267423081357_1103204986_2592317_7875205_n_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=6331" class="usernamelinkdiv">ANN</a> SAID ABOUT <span class="pinkTxt"><br /><a href="/products/eyes/eyeshadow/brilliant-shimmer-duo-eye-wands.aspx">BRILLIANT SHIMMER DUO EYE WANDS</a></span></b><p>Likewise Natasha, i thought it would be a great product as i... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=6331"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment3"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=5168"><img src="/media/5168/P03-09-09_11.36_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=5168">SINYEE</a> SAID </b><p>i used to use this. but now it doesnt seem to go on my skin... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=5168"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment4"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=6941"><img src="/media/6941/purple 2_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=6941">MARIA</a> SAID </b><p>I love this product, not used creme blush for years so just ... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=6941"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment5"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=6329"><img src="/media/6329/snapshot_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=6329" class="usernamelinkdiv">ALICE</a> SAID ABOUT <span class="pinkTxt"><br /><a href="/products/eyes/mascara/collagen-curl-mascara.aspx">COLLAGEN CURL MASCARA</a></span></b><p> if you put a few drops of water in it, you will be stunne... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=6329"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment6"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=4466"><img src="/media/4466/DSC00260_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=4466" class="usernamelinkdiv">KATE</a> SAID ABOUT <span class="pinkTxt"><br /><a href="/products/eyes/eyeshadow/eye-palettes.aspx">EYE PALETTES</a></span></b><p>Went to Superdrug and saw these, i bought the pop-tastic pal... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=4466"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment7"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=4756"><img src="/media/4756/dfgdf_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=4756">JULIE</a> SAID </b><p>They are great and look amazing on thier own with some masca... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=4756"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment8"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=7006"><img src="/media/7006/IMG_1441_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=7006" class="usernamelinkdiv">ABIR</a> SAID ABOUT <span class="pinkTxt"><br /><a href="/products/eyes/mascara/big-fake-false-lash-effect-mascara.aspx">BIG FAKE FALSE LASH EFFECT MASCARA</a></span></b><p>It's no good. since the time i started using it i have had m... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=7006"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment9"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=5242"><img src="/media/5242/me_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=5242" class="usernamelinkdiv">REIKO</a> SAID ABOUT <span class="pinkTxt"><br /><a href="/products/eyes/eyeshadow/dazzle-me!-eye-dust.aspx">DAZZLE ME! EYE DUST</a></span></b><p>Brilliant Pigment Eye shadow dusts, stop wasting your money ... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=5242"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li><li class="licomment"><div class="myCollectionLatest" id="mycollectioncomment10"><div style="float:left;"><div class="colltoppic"><a href="/my-collection.aspx?memberId=5048"><img src="/media/5048/Melissa x_main.jpg" width="74" height="74" onerror="ImgError(this);" /></a></div><div class="collbottompic" /><div style="float:left; position:absolute; margin-left:83px; margin-top:-84px;" class="mycolllatestlinks"><b><a href="/my-collection.aspx?memberId=5048">MELISSA</a> SAID </b><p>I have the whole collection and wear it everyday :D I absolu... </p></div><div class="randomCommentsSeeMore"><span class="pinkTxt"><a href="/my-collection.aspx?memberId=5048"> See more <img src="/images/navControls/more-arrow.jpg" alt="see more" /></a></span></div></div></div></li></ul><img src="/images/my-collection/black-down.jpg" id="mycolldown" /><script> if (BrowserDetect.browser == "Safari") { if ($('#myCollectionFeaturedCollection').size() == 1) { $('#mycolldown').css({ "margin-top": "580px !important" }); } else { $('#mycolldown').css({ "margin-top": "380px !important" }); } } </script> <!--<img src="/images/my-collection/black-up.jpg" id="mycollup" /><ul /><img src="/images/my-collection/black-down.jpg" id="mycolldown" /> --> </div>

    Read the article

  • Create link on page w/ web address stored in database

    - by RememberME
    This seems like it should be easy, but I can't seem to figure it out. All of my google searches lead me to linking to databases which isn't what I want to do. I'm a complete web development newb. I've roughly followed the NerdDinner tutorial in creating my web app. One of my stored fields is a web address. On the Index and Details pages, when I display the info from my record, I want the web address to be a clickable link to the website. It's currently displayed as: <%= Html.Encode(Model.Subcontract.company1.website) %>

    Read the article

  • A Simple Collapsible Menu with jQuery

    - by Vincent Maverick Durano
    In this post I'll demonstrate how to make a simple collapsible menu using jQuery. To get started let's go ahead and fire up Visual Studio and create a new WebForm.  Now let's build our menu by adding some div, p and anchor tags. Since I'm using a masterpage then the ASPX mark-up should look something like this:   1: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 2: <div id="Menu"> 3: <p>CARS</p> 4: <div class="section"> 5: <a href="#">Car 1</a> 6: <a href="#">Car 2</a> 7: <a href="#">Car 3</a> 8: <a href="#">Car 4</a> 9: </div> 10: <p>BIKES</p> 11: <div class="section"> 12: <a href="#">Bike 1</a> 13: <a href="#">Bike 2</a> 14: <a href="#">Bike 3</a> 15: <a href="#">Bike 4</a> 16: <a href="#">Bike 5</a> 17: <a href="#">Bike 6</a> 18: <a href="#">Bike 7</a> 19: <a href="#">Bike 8</a> 20: </div> 21: <p>COMPUTERS</p> 22: <div class="section"> 23: <a href="#">Computer 1</a> 24: <a href="#">Computer 2</a> 25: <a href="#">Computer 3</a> 26: <a href="#">Computer 4</a> 27: </div> 28: <p>OTHERS</p> 29: <div class="section"> 30: <a href="#">Other 1</a> 31: <a href="#">Other 2</a> 32: <a href="#">Other 3</a> 33: <a href="#">Other 4</a> 34: </div> 35: </div> 36: </asp:Content>   As you can see there's nothing fancy about the mark up above.. Now lets go ahead create a simple CSS to set the look and feel our our Menu. Just for for the simplicity of this demo, add the following CSS below under the <head> section of the page or if you are using master page then add it a the content head. Here's the CSS below:   1: <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> 2: <style type="text/css"> 3: #Menu{ 4: width:300px; 5: } 6: #Menu > p{ 7: background-color:#104D9E; 8: color:#F5F7FA; 9: margin:0; 10: padding:0; 11: border-bottom-style: solid; 12: border-bottom-width: medium; 13: border-bottom-color:#000000; 14: cursor:pointer; 15: } 16: #Menu .section{ 17: padding-left:5px; 18: background-color:#C0D9FA; 19: } 20: a{ 21: display:block; 22: color:#0A0A07; 23: } 24: </style> 25: </asp:Content>   Now let's add the collapsible effects on our menu using jQuery. To start using jQuery then register the following script at the very top of the <head> section of the page or if you are using master page then add it the very top of  the content head section.   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" ></script>   As you can see I'm using Google AJAX API CDN to host the jQuery file. You can also download the jQuery here and host it in your server if you'd like. Okay here's the the jQuery script below for adding the collapsible effects:   1: <script type="text/javascript"> 2: $(function () { 3: $("a").mouseover(function () { $(this).addClass("highlightRow"); }) 4: .mouseout(function () { $(this).removeClass("highlightRow"); }); 5:   6: $(".section").hide(); 7: $("#Menu > p").click(function () { 8: $(this).next().slideToggle("Slow"); 9: }); 10: }); 11: </script>   Okay to give you a little bit of explaination, at line 3.. what it does is it looks for all the "<a>" anchor elements on the page and attach the mouseover and mouseout event. On mouseover, the highlightRow css class is added to <a> element and on mouse out we remove the css class to revert the style to its default look. at line 6 we will hide all the elements that has a class name set as "section" and if you look at the mark up above it is refering to the <div> elements right after each <p> element. At line 7.. what it does is it looks for a <p> element that is a direct child of the element that has an ID of "Menu" and then attach the click event to toggle the visibilty of the section. Here's how it looks in the page: On Initial Load: After Clicking the Section Header:   That's it! I hope someone find this post usefu!   Technorati Tags: ASP.NET,JQuery,Master Page,JavaScript

    Read the article

  • jQuery hover menu not disappearing

    - by Nathan Loding
    I have a basic menu using some nested UL's, which is pretty standard I think. When hovering over an LI from the "root" menu, I want the UL within that LI to display. Move the mouse off or to another LI, it shows that submenu. Move down to the submenu and it stays while you hover over each element. I had it working with a simple jQuery.hover() set, but then I ran into issues. When on a page, the "root" menu item is given a class of 'current-page' and if that class exists, I want it to display that submenu statically after a mouseout. Hope I explained that well enough. I just tossed a variable into the hover functions so on the mouseout it ran a .show() on the current-page's submenu. Easy. Except that when I move the mouse between the individual LI's of the submenu, it changes back to the current-page submenu. So I attempted to add a timer element based on another question here. That made things worse -- now the submenus just don't disappear. Here's my CSS, markup, and JS ... how the heck do I make this work properly? Markup: <div id="menu"> <div id="navbar"> <ul id="firstmenu"> <li> <a href="http://localhost/site/pageone">page one</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagetwo">barely there</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li class="current-page"> <a href="http://localhost/site/pagetwo">kith & kin</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagethree">focal point</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagefour">products</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagefive">clients</a> </li> </ul> </div></div> And here's the CSS: #navbar { margin: 0; padding: 0; border: 0; text-align: center; } #firstmenu { margin: 6px auto 0 auto; font-size: 16px; list-style-type: none; letter-spacing: -1px; } #firstmenu li { display: inline; position:relative; overflow: hidden; text-align: center; margin-right: 10px; padding: 5px 15px; } #firstmenu a { text-decoration: none; outline: none; color: black; font-weight: 700; width: 75px; cursor: pointer; } .current-page { color: white; background: url(../images/down_arrow.png) bottom center no-repeat; } .current-page a { color: white; border-bottom: 1px solid black; } #firstmenu .current-page a { color: white; } #firstmenu li.hover { color: white; background: url(../images/down_arrow.png) bottom center no-repeat; } #firstmenu li.hover a { color: white; border-bottom: 1px solid black; } #firstmenu li ul li.hover { color: white; background: none; } #firstmenu li ul li.hover a { color: white; border-bottom: none; text-decoration: underline; } #firstmenu li ul { width: 900px; color: white; font-size: .8em; margin-top: 3px; padding: 5px; position: absolute; display: none; } #firstmenu li ul li { list-style: none; display: inline; width: auto; } #firstmenu li ul li a { color: white; font-weight: normal; border: none; } .sub-current-page { font-weight: bold; text-decoration: underline; } #firstmenu li ul li.sub-current-page a { font-weight: bold; } And lastly, my not-at-all-working JS (this is in a $(document).ready(), of course): // Initialize some variables var hideSubmenuTimer = null; var current_page; $('.current-page ul:first').show(); // Prep the menu $('#firstmenu li').hover(function() { // Clear the timeout if it exists if(hideSubmenuTimer) { clearTimeout(hideSubmenuTimer); } // Check if there's a current-page class set if($('li.current-page').length > 0) { current_page = $('li.current-page'); } else { current_page = false; } // If there's a current-page class, hide it if(current_page) { current_page.children('ul:first').hide(); } // Show the new submenu $(this).addClass('hover').children('ul:first').show(); }, function(){ // Just in case var self = this; // Clear the timeout if it exists if(hideSubmenuTimer) { clearTimeout(hideSubmenuTimer); } // Check if there's a current-page class set if($('li.current-page').length > 0) { current_page = $('li.current-page'); } else { current_page = false; } // Set a timeout on hiding the submenu hideSubmenuTimer = setTimeout(function() { // Hide the old submenu $(self).removeClass('hover').children('ul').hide(); // If there's a current-page class, show it if(current_page) { current_page.children('ul:first').show(); current_page.css('color', 'white'); } }, 500); }); So what am I doing so wrong? As a side note, I'm using the $('.current-page ul:first').show() because if I gave .current-page any "display" setting in the CSS, it positioned it really weirdly on the page.

    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

  • jQuery slide open and close menus. How to stop them going crazy? [closed]

    - by firefusion
    I want sub menu's of a verticle menu to expand and collapse when moused over. This is what i've got so far but it goes crazy if you do it to quick as all the animations run at once and on a delay. How can i make sure just one menu expands at a time. I've also set the current_page_item to be open but default and I don't want this to expand or collaspe. <ul> <li class="current_page_item"><a href="#">Parent Item</a> <ul class="children"> <li class="page_item"><a href="#">Child page</a></li> <li class="page_item"><a href="#">Child page</a></li> <li class="page_item"><a href="#">Child page</a></li> <li class="page_item"><a href="#">Child page</a></li> </ul> </li> <li class="page_item"><a href="#">Parent Item</a> <ul class="children"> <li class="page_item"><a href="#">Child page</a></li> <li class="page_item"><a href="#">Child page</a></li> </ul> </li> <li class="page_item"><a href="#">Parent Item</a> <ul class="children"> <li class="page_item"><a href="#">Child page</a></li> <li class="page_item"><a href="#">Child page</a></li> </ul> </li> <li class="page_item"><a href="#">Parent Item</a></li> <li class="page_item"><a href="#">Parent Item</a></li> </ul> jQuery('ul.children').hide(); jQuery('li.current_page_item ul.children').show(); jQuery('li.current_page_item').parent().show(); jQuery("li.page_item").hover(function() { jQuery(this).find('ul.children').delay(300).slideDown('slow'); }, function() { jQuery(this).find('ul.children').delay(300).slideUp('slow'); });

    Read the article

  • #include file vs iframe or is there a better way

    - by Laurence Burke
    ok simple question about including large mostly static html and asp.net code I am using as of right now #include and I was wondering if iframes would be a better way of handling what I wish to do or is there a better way to do it. here is the current way i'm handling the includes default.aspx <head id="YafHead" runat="server"> <meta id="YafMetaDescription" runat="server" name="description" content="Yet Another Forum.NET -- A bulletin board system written in ASP.NET" /> <meta id="YafMetaKeywords" runat="server" name="keywords" content="Yet Another Forum.net, Forum, ASP.NET, BB, Bulletin Board, opensource" /> <title>Forums</title> <style type="text/css"> .sbutton { background-color:#361800; border:medium none; border-collapse:collapse; color:#FFFFFF; font-family:Tahoma,Arial,Helvetica; font-size:10px; font-weight:bold; vertical-align:middle; } </style> <link href="images/favicon.ico" type="image/ico" rel="shortcut icon" /> <link rel="stylesheet" href="navTopStyle.css" type="text/css" media="screen" /> </head> <body style="margin: 0"> <form id="form1" runat="server" enctype="multipart/form-data"> <table align="center" style="background-color: #ffffff" cellpadding="0" cellspacing="0" width="790px"> <tr> <td> <!--#include file="CComHeader.html"--> </td> </tr> <tr> <td> <YAF:Forum runat="server" ID="forum"></YAF:Forum> </td> </tr> </table> </form> </body> </html> CComHeader.html <table cellpadding="0" cellspacing="0" width="790px"> <tr> <td align="left"> <img src="images/smokechair.jpg" alt="Cigar.com" /><img src="images/cigarcomTitle.gif" alt="Cigar.com" /> </td> <td align="right"> <table width="310px" height="73px" cellpadding="0" cellspacing="0" style="padding-right: 6px"> <tr> <td width="109px" class="welcome" align="left"> Welcome to Cigar.com </td> <td width="195px" class="welcome" align="left"> <div runat="server" id="divUser"> <table cellpadding="0" cellspacing="0" align="right"> <tr> <td width="126px" align="left"> <asp:Label ID="lblUserName" CssClass="welcome" runat="server"></asp:Label></td> <td width="65px" align="left"> <a href="http://www.cigar.com/cs/languages/en-US/docs/faq.aspx">Help</a></td> </tr> </table> </div> <div runat="server" id="divGuest"> <a href="OutsideLogin.aspx">Sign In</a> | <a href="OutsideLogin.aspx">Join</a> | <a href="http://www.cigar.com/cs/languages/en-US/docs/faq.aspx">Help</a> </div> </td> </tr> <tr> <td colspan="2"> <table cellpadding="0" cellspacing="0" > <tr> <td width="234px" align="right"> <asp:DropDownList ID="ddlCriteria" runat="server"> <asp:ListItem>Posts</asp:ListItem> <asp:ListItem>Posted By</asp:ListItem> </asp:DropDownList> <asp:TextBox Width="120px" ID="txtSearch" runat="server"></asp:TextBox> </td> <td width="70px" align="center"> <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="sbutton" OnClick="btnSearch_Click" /> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <!--#include file="commonTabBar.html" --> </td> </tr> </table> commonTabBar.html <%-- CommonTabBar firebugged from Cigar.com--%> <div class="CommonTabBar"> <script language="javascript"> function tabOver(e) { if (e.className != 'CommonSimpleTabStripSelectedTab') e.className = 'CommonSimpleTabStripTabHover'; } function tabOut(e) { if (e.className != 'CommonSimpleTabStripSelectedTab') e.className = 'CommonSimpleTabStripTab'; } function tabOverSub(e) { if (e.className != 'CommonSimpleTabStripSelectedTabSub') e.className = 'CommonSimpleTabStripTabHoverSub'; } function tabOutSub(e) { if (e.className != 'CommonSimpleTabStripSelectedTabSub') e.className = 'CommonSimpleTabStripTabSub'; } </script> <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr valign="middle"> <td class="CommonSimpleTabStripTab" style="padding: 0px"> &nbsp; </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this);" onmouseout="tabOut(this);" onclick="window.location = 'http://www.cigar.com/index.asp'"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/index.asp"> Home</a> </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this); document.getElementById('ComDropDown2').style.display = 'inline';" onmouseout="tabOut(this); document.getElementById('ComDropDown2').style.display = 'none';"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/cigars/index.asp"> Cigars</a> <div id="ComDropDown2" style="border: 1px solid rgb(71, 42, 24); margin: 28px 0px 0px; display: none; background-color: rgb(235, 230, 208); color: rgb(71, 42, 24); position: absolute; float: left; z-index: 200;" onmouseover="document.getElementById('ComDropDown2').style.display = 'inline';" onmouseout="document.getElementById('ComDropDown2').style.display = 'none';"> <ul style="margin: 0px; padding: 0px; width: 100px;"> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/index.asp'"><a href="http://www.cigar.com/cigars/index.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="BrandsLink">Brands </a> </li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/privatelabel.asp?brand=419'"> <a href="http://www.cigar.com/cigars/privatelabel.asp?brand=419" style="line-height: 25px; color: rgb(71, 42, 24);" id="SamplersLink">Aging Room </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/samplers.asp'"><a href="http://www.cigar.com/cigars/samplers.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="SamplersLink">Samplers </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/suggestions.asp'"><a href="http://www.cigar.com/cigars/suggestions.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="SuggestionsLink">Suggestions </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/DailyDeal/ccCigarDeals.asp'"><a href="http://www.cigar.com/DailyDeal/ccCigarDeals.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="SuggestionsLink">Suggestions </a></li> </ul> </div> </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this); document.getElementById('ComDropDown3').style.display = 'inline';" onmouseout="tabOut(this); document.getElementById('ComDropDown3').style.display = 'none';"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/cigars/samplers.asp"> Samplers</a> <div id="ComDropDown3" style="border: 1px solid rgb(71, 42, 24); margin: 28px 0px 0px; display: none; background-color: rgb(235, 230, 208); color: rgb(71, 42, 24); position: absolute; float: left; z-index: 200;" onmouseover="document.getElementById('ComDropDown3').style.display = 'inline';" onmouseout="document.getElementById('ComDropDown3').style.display = 'none';"> <ul style="margin: 0px; padding: 0px; width: 100px;"> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/viewsamplers.asp?subcatid=samp_var'"> <a href="http://www.cigar.com/cigars/viewsamplers.asp?subcatid=samp_var" style="line-height: 25px; color: rgb(71, 42, 24);" id="Variety SamplersLink">Variety Samplers </a> </li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/viewsamplers.asp?subcatid=gift_samp'"> <a href="http://www.cigar.com/cigars/viewsamplers.asp?subcatid=gift_samp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Gift SamplersLink">Gift Samplers </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/createSampler.asp'"><a href="http://www.cigar.com/cigars/createSampler.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Custom SamplerLink">Custom Sampler </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/viewsamplers.asp?subcatid=Feat%20Samp'"> <a href="http://www.cigar.com/cigars/viewsamplers.asp?subcatid=Feat%20Samp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Featured SamplersLink">Featured Samplers </a> </li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/YouPickOffer.asp'"><a href="http://www.cigar.com/cigars/YouPickOffer.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Brand SamplersLink">U Pick 2 Offer </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/exclusiveCustomSampler.asp'"> <a href="http://www.cigar.com/cigars/exclusiveCustomSampler.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Brand SamplersLink">Gurkha Sampler </a></li> </ul> </div> </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this); document.getElementById('ComDropDown4').style.display = 'inline';" onmouseout="tabOut(this); document.getElementById('ComDropDown4').style.display = 'none';"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/gifts/index.asp"> Gifts</a> <div id="ComDropDown4" style="border: 1px solid rgb(71, 42, 24); margin: 28px 0px 0px; display: none; background-color: rgb(235, 230, 208); color: rgb(71, 42, 24); position: absolute; float: left; z-index: 200;" onmouseover="document.getElementById('ComDropDown4').style.display = 'inline';" onmouseout="document.getElementById('ComDropDown4').style.display = 'none';"> <ul style="margin: 0px; padding: 0px; width: 100px;"> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/gifts/viewgifts.asp?subcatid=gift_sets'"> <a href="http://www.cigar.com/gifts/viewgifts.asp?subcatid=gift_sets" style="line-height: 25px; color: rgb(71, 42, 24);" id="Gift SetsLink">Best Sellers </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cigars/viewsamplers.asp?subcatid=gift_samp'"> <a href="http://www.cigar.com/cigars/viewsamplers.asp?subcatid=gift_samp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Gift SamplersLink">Gift Samplers </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/index.asp'"><a href="http://www.cigar.com/accessories/index.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="AccesoriesLink">Accesories </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/club/index.asp'"><a href="http://www.cigar.com/club/index.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Cigar of the MonthLink">Cigar of the Month </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/gifts/certificates.asp'"><a href="http://www.cigar.com/gifts/certificates.asp" style="line-height: 25px; color: rgb(71, 42, 24);" id="Cigar of the MonthLink">Gift Certificates </a></li> </ul> </div> </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this); document.getElementById('ComDropDown5').style.display = 'inline';" onmouseout="tabOut(this); document.getElementById('ComDropDown5').style.display = 'none';"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/accessories/index.asp"> Accessories</a> <div id="ComDropDown5" style="border: 1px solid rgb(71, 42, 24); margin: 28px 0px 0px; display: none; background-color: rgb(235, 230, 208); color: rgb(71, 42, 24); position: absolute; float: left; z-index: 200;" onmouseover="document.getElementById('ComDropDown5').style.display = 'inline';" onmouseout="document.getElementById('ComDropDown5').style.display = 'none';"> <ul style="margin: 0px; padding: 0px; width: 100px;"> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_hum'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_hum" style="line-height: 25px; color: rgb(71, 42, 24);" id="HumidorsLink">Humidors </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_cutt'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_cutt" style="line-height: 25px; color: rgb(71, 42, 24);" id="CuttersLink">Cutters </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_lite'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_lite" style="line-height: 25px; color: rgb(71, 42, 24);" id="LightersLink">Lighters </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_case'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_case" style="line-height: 25px; color: rgb(71, 42, 24);" id="CasesLink">Cases </a> </li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_humf'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_humf" style="line-height: 25px; color: rgb(71, 42, 24);" id="HumidificationLink">Humidification </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_book'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_book" style="line-height: 25px; color: rgb(71, 42, 24);" id="BooksLink">Books </a> </li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_ash'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_ash" style="line-height: 25px; color: rgb(71, 42, 24);" id="AshtraysLink">Ashtrays </a></li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_misc'"> <a href="http://www.cigar.com/accessories/viewaccessories.asp?subcatid=acc_misc" style="line-height: 25px; color: rgb(71, 42, 24);" id="OtherLink">Other </a> </li> </ul> </div> </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this);" onmouseout="tabOut(this);" onclick="window.location = 'http://www.cigar.com/sales/index.asp'"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/sales/index.asp"> Sales</a> </td> <td class="CommonSimpleTabStripTab" onmouseover="tabOver(this); document.getElementById('ComDropDown8').style.display = 'inline';" onmouseout="tabOut(this); document.getElementById('ComDropDown8').style.display = 'none';"> <a style="float: right; display: block; height: 30px; line-height: 30px; padding-left: 12px; padding-right: 12px; vertical-align: middle;" href="http://www.cigar.com/cs/">Community</a> <div id="ComDropDown8" style="border: 1px solid rgb(71, 42, 24); margin: 28px 0px 0px; display: none; background-color: rgb(235, 230, 208); color: rgb(71, 42, 24); position: absolute; float: left; z-index: 200;" onmouseover="document.getElementById('ComDropDown8').style.display = 'inline';" onmouseout="document.getElementById('ComDropDown8').style.display = 'none';"> <ul style="margin: 0px; padding: 0px; width: 100px;"> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cs/forums/'"><a href="http://www.cigar.com/cs/forums/" style="line-height: 25px; color: rgb(71, 42, 24);" id="ForumsLink">Forums </a> </li> <li class="CommonSimpleTabStripTabSub" style="margin: 0px; padding: 3px; text-align: left; list-style: none outside none;" onmouseover="tabOverSub(this); " onmouseout="tabOutSub(this); " onclick="window.location = 'http://www.cigar.com/cs/blogs/'"><a href="http://w

    Read the article

  • Custom Collection Implementing IEnumerable

    - by Burnzy
    I know that technically, an Interface is used for reading and not writting or editing however, I want to add an add and addrange function to the following class, here is what I currently have which is not working public class HrefCollection : IEnumerable<Href> { private IEnumerable<Href> hrefs; public IEnumerable<Href> Add( Href href ) { yield return href; } public IEnumerable<Href> AddRange( List<Href> hrefs ) { foreach( Href href in hrefs ) { yield return href; } } public IEnumerator<Href> GetEnumerator() { return hrefs.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return hrefs.GetEnumerator(); } } I'm not quite sure how to associate the yield return with the private list. Thanks for your help!

    Read the article

  • Select <a> which is the second <a> on a page that contains the same href text? jQuery

    - by Alex
    Hello there, I'm working with a page that has several links that contain the same href text, and I need to select the second anchor element on the page that contains said href text. Here's a simplified version of the link structure of the page: <a href="same/link/to/stuff/">same link</a> <a href="same/link/to/stuff/">same link</a> How do I fashion my selector so that it only selects the second anchor in the above example? Currently I'm trying: $('a[href=same/link/to/stuff/] :eq(1)') but it is not working. Thanks!!

    Read the article

  • jQuery how to set click on href in the div?

    - by faya
    Good day, I want to set click event on every anchor element in my div container. Here is an example what I want to do: ---HTML--- <div id="my-container"> <a href="page1.html">page1</a> <a href="page2.html">page2</a> <a href="page3.html">page3</a> </div> ---- jQuery ---- $("#my-container a").click(function() { var link = $(this).attr("href"); $("#my-container").load(link); }); What I want to do is to let me handle loading event of href clicks and load it to the same container. And this is must done without id, class attributes which aren't available for that hrefs. The problem is in this: $("#my-container a"). Any help would be appreciated! Thanks UPDATE People doesn't seem to get right what I wanted to ask. I repeat myself again. $("#my-container a") <---- doesn't add click events on href anchors. So how I can set click event?

    Read the article

  • IIRF reverse proxy problem

    - by Sergei
    Hi everyone, We have a java application ( Atlassian Bamboo) running on port 8085 on Windows 2003. It is accessile as http: //bamboo:8085. I am trying to setup reverse proxy for IIS6 using IIRF so content is accessible via http: //bamboo. It seems that I set it ip correctly, and I can retrieve Status page. This is how my IIRF.ini looks like: RewriteLog c:\temp\iirf RewriteLogLevel 2 StatusUrl /iirfStatus RewriteCond %{HTTP_HOST} ^bambooi$ [I] #This setup works #ProxyPass ^/(.*)$ http://othersite/$1 #This does not ProxyPass ^/(.*)$ http://bamboo:8085/$1 However when I type in http: //bamboo in IE, I get 'page cannot be displayed ' message. FF does not return anything at all. I made Wireshark network dump, selected 'follow TCPstream' and it seems like correct page is being retrieved.Why cannot I see it then? I also noticed that I can retrieve http: //bamboo/favicon.ico so I must be very close to the solution.. This is the Wireshark output: GET / HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* Accept-Language: en-gb User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Accept-Encoding: gzip, deflate Host: bamboo Connection: Keep-Alive Cookie: JSESSIONID=wpsse0zyo4g5 HTTP/1.1 200 200 OK Date: Sat, 30 Jan 2010 09:19:46 GMT Server: Microsoft-IIS/6.0 Via: 1.1 DESTINATION_IP (IIRF 2.0) Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Dashboard</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="robots" content="all" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="-1" /> <link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui-2.6.0/build/grids/grids.css" /> <!--<link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui/build/reset-fonts-grids/reset-fonts-grids.css" />--> <link rel="stylesheet" href="/s/1206/1/_/styles/main.css" type="text/css" /> <link rel="stylesheet" href="/s/1206/1/_/styles/main2.css" type="text/css" /> <link rel="stylesheet" href="/s/1206/1/_/styles/global-static.css" type="text/css" /> <link rel="stylesheet" href="/s/1206/1/_/styles/widePlanList.css" type="text/css" /> <link rel="stylesheet" href="/s/1206/1/_/styles/forms.css" type="text/css" /> <link rel="stylesheet" href="/s/1206/1/_/styles/yui-support/yui-custom.css" type="text/css" /> <link rel="shortcut icon" href="/s/1206/1/_/images/icons/favicon.ico" type="image/x-icon"/> <link rel="icon" href="/s/1206/1/_/images/icons/favicon.png" type="image/png" /> <link rel="stylesheet" href="/s/1206/1/_/styles/bamboo-tabs.css" type="text/css" /> <!-- Core YUI--> <link rel="stylesheet" type="text/css" href="/s/1206/1/_/scripts/yui-2.6.0/build/tabview/assets/tabview-core.css"> <link rel="stylesheet" type="text/css" href="/s/1206/1/_/scripts/yui-2.6.0/build/tabview/assets/skins/sam/tabview-skin.css"> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/yahoo/yahoo-min.js"></script> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/event/event-min.js" ></script> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/dom/dom-min.js" ></script> <!--<script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/animation/animation.js" ></script>--> <!-- Container --> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/container/container-min.js"></script> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/connection/connection-min.js"></script> <link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui-2.6.0/build/container/assets/container.css" /> <!-- Menu --> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/menu/menu-min.js"></script> <link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui-2.6.0/build/menu/assets/menu.css" /> <!-- Tab view --> <!-- JavaScript Dependencies for Tabview: --> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/element/element-beta-min.js"></script> <!-- Needed for old versions of the YUI --> <link rel="stylesheet" href="/s/1206/1/_/styles/yui-support/tabview.css" type="text/css" /> <link rel="stylesheet" href="/s/1206/1/_/styles/yui-support/round_tabs.css" type="text/css" /> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/tabview/tabview-min.js"></script> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-2.6.0/build/json/json-min.js"></script> <script type="text/javascript" src="/s/1206/1/_/scripts/yui-ext/yui-ext-nogrid.js"></script> <script type="text/javascript" src="/s/1206/1/_/scripts/bamboo.js"></script> <script type="text/javascript"> YAHOO.namespace('bamboo'); YAHOO.bamboo.tooltips = new Object(); YAHOO.bamboo.contextPath = ''; YAHOO.ext.UpdateManager.defaults.loadScripts = true; YAHOO.ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Currently loading...</div>'; YAHOO.ext.UpdateManager.defaults.timeout = 60; addUniversalOnload(addConfirmationToLinks); </script> <link rel="alternate" type="application/rss+xml" title="Bamboo RSS feed" href="/rss/createAllBuildsRssFeed.action?feedType=rssAll" /> </head> <body> <ul id="top"> <li id="skipNav"> <a href="#menu">Skip to navigation</a> </li> <li> <a href="#content">Skip to content</a> </li> </ul> <div id="nonFooter"> <div id="hd"> <div id="header"> <div id="logo"> <a href="/start.action"><img src="/images/bamboo_header_logo.gif" alt="Atlassian Bamboo" height="36" width="118" /></a> </div> <ul id="userOptions"> <li id="loginLink"> <a id="login" href="/userlogin!default.action?os_destination=%2Fstart.action">Log in</a> </li> <li id="signupLink"> <a id="signup" href="/signupUser!default.action">Signup</a> </li> <li id="helpLink"> <a id="help" href="http://confluence.atlassian.com/display/BAMBOO">Help</a> </li> </ul> </div> <!-- END #header --> <div id="menu"> <ul> <li><a id="home" href="/start.action" title="Atlassian Bamboo" accesskey="H"> <u>H</u>ome</a></li> <li><a id="authors" href="/authors/gotoAuthorReport.action" accesskey="U">A<u>u</u>thors</a></li> <li><a id="reports" href="/reports/viewReport.action" accesskey="R"> <u>R</u>eports</a></li> </ul> </div> <!-- END #menu --> </div> <!-- END #hd --> <div id="bd"> <div id="content"> <h1>Header here</h1> <div class="topMarginned"> <div id='buildSummaryTabs' class='dashboardTab'> </div> <script type="text/javascript"> function initUI(){ var jtabs = new YAHOO.ext.TabPanel('buildSummaryTabs'); YAHOO.bamboo.tabPanel = jtabs; // Use setUrl for Ajax loading var tab3 = jtabs.addTab('allTab', "All Plans"); tab3.setUrl('/ajax/displayAllBuildSummaries.action', null, true); var tab4 = jtabs.addTab("currentTab", "Current Activity"); tab4.setUrl('/ajax/displayCurrentActivity.action', null, true); var handleTabChange = function(e, activePanel) { saveCookie('atlassian.bamboo.dashboard.tab.selected', activePanel.id, 365); }; jtabs.on('tabchange', handleTabChange); var selectedCookie = getCookieValue('atlassian.bamboo.dashboard.tab.selected'); if (jtabs.getTab(selectedCookie)) { jtabs.activate(selectedCookie); } else { jtabs.activate('allTab'); } } YAHOO.util.Event.onContentReady('buildSummaryTabs', initUI); </script> </div> <script type="text/javascript"> setTimeout( "window.location.reload()", 1800*1000 ); </script> <div class="clearer" ></div> </div> <!-- END #content --> </div> <!-- END #bd --> </div> <!-- END #nonFooter --> <div id="ft"> <div id="footer"> <p> Powered by <a href="http://www.atlassian.com/software/bamboo/">Atlassian Bamboo</a> version 2.2.1 build 1206 - <span title="15:59:44 17 Mar 2009">17 Mar 09</span> </p> <ul> <li class="first"> <a href="https://support.atlassian.com/secure/CreateIssue.jspa?pid=10060&issuetype=1">Report a problem</a> </li> <li> <a href="http://jira.atlassian.com/secure/CreateIssue.jspa?pid=11011&issuetype=4">Request a feature</a> </li> <li> <a href="http://forums.atlassian.com/forum.jspa?forumID=103">Contact Atlassian</a> </li> <li> <a href="/viewAdministrators.action">Contact Administrators</a> </li> </ul> </div> <!-- END #footer --> </div> <!-- END #ft -->

    Read the article

  • JQuery Hover li Show div which sits outside li structure

    - by Dave_Stott
    Hi everyone I'm currently trying to create a "mega" dropout menu using JQuery but have encountered an issue I'm yet to be able to resolve. At the moment I have the following HTML structure: <div id="TopNav" class="grid_16"> <ul class="cmsListMenuUL level0" id="TopNavMenu"> <li class="cmsListMenuLIcmsListMenuLI highlightedLI" id="TopNavMenu_Home"><a href="/"> <span class="text">Home</span></a></li> <li class="cmsListMenuLIfirst" id="TopNavMenu_0_1"><a href="/Key-Sectors.aspx" class="cmsListMenuLink"> <span class="text">Key Sectors</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_2"><a href="/Global-Brands.aspx" class="cmsListMenuLink"> <span class="text">Global Brands</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_3"><a href="/News---Features.aspx" class="cmsListMenuLink"> <span class="text">News &amp; Features</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_4"><a href="/Videos.aspx" class="cmsListMenuLink"> <span class="text">Videos</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_5"><a href="/Events.aspx" class="cmsListMenuLink"> <span class="text">Events</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_6"><a href="/Key-Cities.aspx" class="cmsListMenuLink"> <span class="text">Key Cities</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_7"><a href="/Doing-Business-in-Yorkshire.aspx" class="cmsListMenuLink"><span class="text">Doing Business in Yorkshire</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_8"><a href="/How-We-Can-Help.aspx" class="cmsListMenuLink"> <span class="text">How We Can Help</span></a></li> <li class="cmsListMenuLI" id="TopNavMenu_0_9"><a href="/Contact-Us.aspx" class="cmsListMenuLink"> <span class="text">Contact Us</span></a></li> </ul> </div> <div class="sectorsDropped"> <div class="floatLeft leftColumn"> <div class="parentItem" style="border-color: #0064BE;"> <a href="/Key-Sectors/Advanced-Engineering---Materials.aspx" class="parentItemContent"> Advanced Engineering &amp; Materials</a><div class="childItem"> <a href="/Key-Sectors/Advanced-Engineering---Materials/Nuclear.aspx">- Nuclear</a></div> <div class="childItem"> <a href="/Key-Sectors/Advanced-Engineering---Materials/Logistics---Infrastructure.aspx"> - Logistics &amp; Infrastructure</a></div> </div> <div class="parentItem" style="border-color: #FFB611;"> <a href="/Key-Sectors/Chemicals.aspx" class="parentItemContent">Chemicals</a></div> <div class="parentItem" style="border-color: #B7CC0B;"> <a href="/Key-Sectors/Environmental-Technologies.aspx" class="parentItemContent">Environmental Technologies</a><div class="childItem"> <a href="/Key-Sectors/Environmental-Technologies/Offshore-Wind.aspx">- Offshore Wind</a></div> <div class="childItem"> <a href="/Key-Sectors/Environmental-Technologies/Carbon-Capture---Storage.aspx">- Carbon Capture &amp; Storage</a></div> <div class="childItem"> <a href="/Key-Sectors/Environmental-Technologies/Tidal-Power.aspx">- Tidal Power</a></div> <div class="childItem"> <a href="/Key-Sectors/Environmental-Technologies/Biomass.aspx">- Biomass</a></div> </div> </div> <div class="floatLeft rightColumn"> <div class="parentItem" style="border-color: #AC26AA;"> <a href="/Key-Sectors/Digital---New-Media.aspx" class="parentItemContent">Digital &amp; New Media</a></div> <div class="parentItem" style="border-color: #e1477e;"> <a href="/Key-Sectors/Food---Drink.aspx" class="parentItemContent">Food &amp; Drink</a></div> <div class="parentItem" style="border-color: #00c5b5;"> <a href="/Key-Sectors/Healthcare-Technologies.aspx" class="parentItemContent">Healthcare Technologies</a><div class="childItem"> <a href="/Key-Sectors/Healthcare-Technologies/Biotechnology.aspx">- Biotechnology</a></div> <div class="childItem"> <a href="/Key-Sectors/Healthcare-Technologies/Pharmaceuticals.aspx">- Pharmaceuticals</a></div> <div class="childItem"> <a href="/Key-Sectors/Healthcare-Technologies/Medical-Devices.aspx">- Medical Devices</a></div> </div> <div class="parentItem" style="border-color: #AC1A2F;"> <a href="/Key-Sectors/Financial---Professional.aspx" class="parentItemContent">Financial &amp; Professional</a></div> </div> </div> In normal circumstances the div containing the "mega" menu options would sit inside the li item that fires the show/hide but this is currently not possible as the ul list of navigation links is rendered using a 3rd party piece of software which does not provide an equivalent of an OnItemDataBound event for me to be able to inject the div into the item Does anyone know of a way, using JQuery, of showing the div but maintain the display of the div as the mouse focus leaves the li that originaly displayed the div and actually enters the div? I'm currently using the following JQuery which displays the div correctly but as the mouse focus enters the div the div then disappears as the mouse focus from the li has now moved: $(document).ready(function() { function addMega(){ $(".sectorsDropped").toggle("fast"); } function removeMega(){ $(".sectorsDropped").toggle("fast"); } var megaConfig = { interval: 500, sensitivity: 4, over: addMega, timeout: 500, out: removeMega }; $("#TopNavMenu_0_1").hoverIntent(megaConfig) }); Thanks Dave

    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

  • Jquery getJSON cross domain problems

    - by Charlie
    I cant seem to get my JSON file to work when pulling it in from another domain using JQuerys getJSON. I have placed the callback part at the end of the url but still have no joy. Firebug tells me its a cross domain issue, which seems to make sense as if I place the json file locally the below code (excluding the ?jsoncallback=? works fine) Heres the Jquery part $.getJSON("http://anotherdomain/js/morearticles.js?jsoncallback=?", function(json){ if (show5More.nextSetCount ' + this.titletext + '' + this.paratext + '').appendTo("#lineupswitch"); } else { $('' + this.titletext + '' + this.paratext + '').appendTo("#lineupswitch"); } }); return false; } }); } }); } And the JSON, which I have validated. { "items": [ [ { "href": "/edinburgh/video/news-090415-s2-squalor-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19721015001_asset-1239819553334.jpg?pubId=1486976045", "titletext": "Cannabis plants found in house with neglected children", "paratext": "A court has heard four young children lived in", "cname": "" }, { "href": "/edinburgh/video/news-090414-s2-waverley-station-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19537855001_asset-1239732920496.jpg?pubId=1486976045", "titletext": "Multi-million pound revamp for Waverley Station", "paratext": "Edinburgh's Waverley Station is set for a", "cname": "" }, { "href": "/edinburgh/video/news-s2-natal-20090408/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18948154001_asset-1239206353135.jpg?pubId=1486976045", "titletext": "Stillbirth charity on the road to raise awareness", "paratext": "SANDS Lothian are hoping to highlight their", "cname": "" }, { "href": "/edinburgh/video/news-090407-l2-rbs/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18827378001_asset-1239110600777.jpg?pubId=1486976045", "titletext": "Thousands of jobs to go at Royal Bank of Scotland", "paratext": "Edinburgh-based bank to cut 4,500 positions in the", "cname": "" }, { "href": "/edinburgh/video/news-090415-s2-squalor-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19721015001_asset-1239819553334.jpg?pubId=1486976045", "titletext": "1", "paratext": "A court has heard four young children lived in", "cname": "lastlineup" } ], [ { "href": "/edinburgh/video/news-090415-s2-squalor-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19721015001_asset-1239819553334.jpg?pubId=1486976045", "titletext": "1", "paratext": "A court has heard four young children lived in", "cname": "" }, { "href": "/edinburgh/video/news-090414-s2-waverley-station-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19537855001_asset-1239732920496.jpg?pubId=1486976045", "titletext": "2", "paratext": "Edinburgh's Waverley Station is set for a", "cname": "" }, { "href": "/edinburgh/video/news-s2-natal-20090408/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18948154001_asset-1239206353135.jpg?pubId=1486976045", "titletext": "Stillbirth charity on the road to raise awareness", "paratext": "3", "cname": "" }, { "href": "/edinburgh/video/news-090407-l2-rbs/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18827378001_asset-1239110600777.jpg?pubId=1486976045", "titletext": "Thousands of jobs to go at Royal Bank of Scotland", "paratext": "4", "cname": "" }, { "href": "/edinburgh/video/news-090407-l2-rbs/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18827378001_asset-1239110600777.jpg?pubId=1486976045", "titletext": "Thousands of jobs to go at Royal Bank of Scotland", "paratext": "Edinburgh-based bank to cut 4,500 positions in the", "cname": "lastlineup" } ] ] } { "items": [ [ { "href": "/edinburgh/video/news-090415-s2-squalor-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19721015001_asset-1239819553334.jpg?pubId=1486976045", "titletext": "Cannabis plants found in house with neglected children", "paratext": "A court has heard four young children lived in", "cname": "" }, { "href": "/edinburgh/video/news-090414-s2-waverley-station-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19537855001_asset-1239732920496.jpg?pubId=1486976045", "titletext": "Multi-million pound revamp for Waverley Station", "paratext": "Edinburgh's Waverley Station is set for a", "cname": "" }, { "href": "/edinburgh/video/news-s2-natal-20090408/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18948154001_asset-1239206353135.jpg?pubId=1486976045", "titletext": "Stillbirth charity on the road to raise awareness", "paratext": "SANDS Lothian are hoping to highlight their", "cname": "" }, { "href": "/edinburgh/video/news-090407-l2-rbs/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18827378001_asset-1239110600777.jpg?pubId=1486976045", "titletext": "Thousands of jobs to go at Royal Bank of Scotland", "paratext": "Edinburgh-based bank to cut 4,500 positions in the", "cname": "" }, { "href": "/edinburgh/video/news-090415-s2-squalor-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19721015001_asset-1239819553334.jpg?pubId=1486976045", "titletext": "1", "paratext": "A court has heard four young children lived in", "cname": "lastlineup" } ], [ { "href": "/edinburgh/video/news-090415-s2-squalor-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19721015001_asset-1239819553334.jpg?pubId=1486976045", "titletext": "1", "paratext": "A court has heard four young children lived in", "cname": "" }, { "href": "/edinburgh/video/news-090414-s2-waverley-station-edinburgh/", "thumbimg": "http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_19537855001_asset-1239732920496.jpg?pubId=1486976045", "titletext": "2", "paratext": "Edinburgh's Waverley Station is set for a", "cname": "" }, { "href": "/edinburgh/video/news-s2-natal-20090408/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18948154001_asset-1239206353135.jpg?pubId=1486976045", "titletext": "Stillbirth charity on the road to raise awareness", "paratext": "3", "cname": "" }, { "href": "/edinburgh/video/news-090407-l2-rbs/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18827378001_asset-1239110600777.jpg?pubId=1486976045", "titletext": "Thousands of jobs to go at Royal Bank of Scotland", "paratext": "4", "cname": "" }, { "href": "/edinburgh/video/news-090407-l2-rbs/", "thumbimg":"http://brightcove.vo.llnwd.net/d7/unsecured/media/1486976045/1486976045_18827378001_asset-1239110600777.jpg?pubId=1486976045", "titletext": "Thousands of jobs to go at Royal Bank of Scotland", "paratext": "Edinburgh-based bank to cut 4,500 positions in the", "cname": "lastlineup" } ] ] }

    Read the article

  • jquery accordion - keeps hiding parent element?

    - by PopRocks4344
    Well, I fixed my original question by including after the closing tags, but now, those links won't open? So, basically, in the html below, I'm trying so that only the services section slides open, but I want the h3 tags to open those links... <div id="sp-accordion"> <h3><a href="/?page_id=3">Home</a></h3><div></div> <h3><a href="/?page_id=2">About Us</a></h3><div></div> <h3><a href="#"> Services</a></h3> <div> <p><a href="/?page_id=16">S1</a></p> <p><a href="/?page_id=14">S2</a></p> <p><a href="/?page_id=20">S3</a></p> </div> <h3><a href="/?page_id=9">Contact Us</a></h3><div></div> <h3><a href="/?page_id=5">Tips</a></h3><div></div> <h3><a href="/?page_id=108">Jobs</a></h3><div></div> <h3><a href="/?page_id=131">Newsletter</a></h3><div></div> </div> The accordion works, insomuch that when you click on the h3 tag, the container slides open, however, when it slides open, it hides the h3 before it. So, in the html below, when I click on "Services" the div beneath it slides open, but the About Us h3 disappears... This is the html: <div id="sp-accordion"> <h3><a href="/?page_id=3">Home</a></h3> <h3><a href="/?page_id=2">About Us</a></h3> <h3><a href="#"> Services</a></h3> <div> <p><a href="/?page_id=16">S1</a></p> <p><a href="/?page_id=14">S2</a></p> <p><a href="/?page_id=20">S3</a></p> </div> <h3><a href="/?page_id=9">Contact Us</a></h3> <h3><a href="/?page_id=5">Tips</a></h3> <h3><a href="/?page_id=108">Jobs</a></h3> <h3><a href="/?page_id=131">Newsletter</a></h3> </div> I'm using jquery ui, so the jquery is just this: $(document).ready(function() { $("#sp-accordion").accordion({autoHeight:false}); });

    Read the article

  • Find next and previous link in a hierarchy

    - by rebellion
    I have a hierarchy with links nested in list element like this: <ul> <li><a href="#">Page 1</a> <ul> <li><a href="#">Page 1.1</a></li> <li><a href="#">Page 1.2</a> <ul> <li><a href="#">Page 1.2.1</a></li> <li><a href="#">Page 1.2.2</a></li> </ul> </li> <li><a href="#">Page 1.3</a></li> </ul> </li> <li><a href="#">Page 2</a> <ul> <li><a href="#">Page 2.1</a></li> <li><a href="#">Page 2.2</a></li> </ul> </li> <li><a href="#">Page 3</a> <ul> <li><a href="#">Page 3.1</a> <ul> <li><a href="#">Page 3.1.1</a></li> <li><a href="#">Page 3.1.2</a></li> </ul> <li><a href="#">Page 3.2</a></li> <li><a href="#">Page 3.3</a></li> <ul> <li><a href="#">Page 3.1.1</a></li> <li><a href="#">Page 3.1.2</a></li> </ul> </li> </ul> </li> </ul> Basically just a sitemap. But I want to make next and previous links with jQuery, which finds the active page you're on (probably by checking for a class), and finding the previous and next anchor element (taking no regards of the hierarchy). I've tried with next(), previous() and find() but can't seem to get it to work. What is the easiest way to get the anchor elements before and after the current one?

    Read the article

  • JQuery: Remove duplicate elements?

    - by Keith Donegan
    Say I have a list of links with duplicate values as below: <a href="#">Book</a> <a href="#">Magazine</a> <a href="#">Book</a> <a href="#">Book</a> <a href="#">DVD</a> <a href="#">DVD</a> <a href="#">DVD</a> <a href="#">Book</a> How would I, using JQuery, remove the dups and be left with the following for example: <a href="#">Book</a> <a href="#">Magazine</a> <a href="#">DVD</a> Basically I am looking for a way to remove any duplicate values found and show 1 of each link.

    Read the article

  • jquery for each function

    - by jonathan p
    I have added a show more or less function to a div - this all works fine however now i need to only allow this functionality if a element is over a certain height in this case. there are numerous classes of the same so i need to do the check on each element. although i am having problems getting it to work see code below : $(document).ready(function() { $(".less").hide(); $(".more").each(function() { var actualHeight = ($(this).parent().parent().find('.appsList').height()); if (actualHeight < 150) { $(".more").hide(); } }); $(".more").click(function() { var paragraphHeight = ($(this).parent().parent().find('.appsList').height()); if (paragraphHeight > 150) { $(this).parent().parent().find('.appsHolderBody').animate({height:(paragraphHeight + 100) }); $(this).hide('slow'); $(this).parent().find('.less').show(); } return false; }); $(".less").click(function() { $(this).parent().parent().find('.appsHolderBody').animate({height:190 }); $(this).hide('slow'); $(this).parent().find('.more').show(); return false; }); }); Any help would be greatly appreciated - please note when i am targeting the parent using .parent.parent i know its not pretty but could'nt get it to run using eq(4) for some reason. so the main problem is with this part of code $(".more").each(function() { var actualHeight = ($(this).parent().parent().find('.appsList').height()); if (actualHeight < 150) { $(".more").hide(); } it hides all of the elements $(".more") instead of the ones that match the condition. html as requested <div class="appsHolder"> <div class="appsHolderBody"> <h5 class="appTitle">General Apps</h5> <ul class="appsList"> <li class="mainAppList">Resource Manager</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Resource Manager</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Yet Another App</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Yet Another App</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Yet Another App</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Yet Another App</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Yet Another App</li> <li><a href="">Launch</a> <a href="">Info</a></li> <li class="mainAppList">Yet Another App</li> <li><a href="">Launch</a> <a href="">Info</a></li> </ul> </div> <div class="appsHolderExpander"> <a href="" class="more">More <img src="/wps/PA_applicationsintros/./img/downArrow.png" /></a> <a href="" class="less">Less <img src="/wps/PA_applicationsintros/./img/upArrow.png" /></a> </div> </div> <div class="appsHolderAdvertising"> <div class="appsHolderBody"> <h5 class="appTitle">Advertising Apps</h5> <ul class="appsList"> <li class="mainAppList">ATEX</li> <li><a href="">Launch</a> <a href="">Info</a></li> </ul> </div> <div class="appsHolderExpander"> <a href="" class="more">More <img src="/wps/PA_applicationsintros/./img/downArrow.png" /></a> <a href="" class="less">Less <img src="/wps/PA_applicationsintros/./img/upArrow.png" /></a> </div> </div> cheers in advance

    Read the article

  • DualLayout for SharePoint 2010 WCM Quick Start

    - by svdoever
    DualLayout for SharePoint 2010 WCM is a solution to provide you with complete HTML freedom in your SharePoint Server 2010 publishing pages. In this post I provide a quick start guide to get you up and running quickly so you can try it out for yourself. This quick start creates a simple HTML5 site with a page to show-case the basics and the power of DualLayout. We will create the site in its own web application. Normally there are many things you have to do to create a clean start point for your SharePoint 2010 WCM site. All those steps will be provided in later posts. For now we want to give you the minimal set of steps to take to get DualLayout working on your machine. Create an authenticated web application with hostheader cms.html5demo.local on port 80 for the cms side of the site. Click the Create Site Collection link on the Application Created dialog box and create a Site Collection based on the Publishing Portal site template. Before we can click the site link in the Top-Level Site Successfully Created dialog we need to add the new host header cms.html5demo.local to the hosts file. Add the following line to the hosts file: 127.0.0.1        cms.html5demo.local Navigate to the site at http://cms.html5demo.local to see the out-of-the-box example Adventure Works publishing site. Download and add the DualLayout solution package designfactory.duallayout.sps2010.trial.1.2.0.0.wsp to the farm’s solution store: On the Start menu, click All Programs. Click Microsoft SharePoint 2010 Products. Click SharePoint 2010 Management Shell. At the Windows PowerShell command prompt, type the following command:Add-SPSolution -LiteralPath designfactory.duallayout.sps2010.trial.1.2.0.0.wsp In SharePoint 2010 Central Administration deploy the solution to the web application http://cms.html5demo.local. Navigate to the site at http://cms.html5demo.local, and in the Site Settings screen select Site Collection Administration > Site collection features and activate the following feature: Open the site http://cms.html5demo.local in SharePoint Designer 2010. Create a view-mode masterpage html5simple.master with the following code: html5simple.master <%@ Master language="C#" %> <%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="sdl" Namespace="DesignFactory.DualLayout" Assembly="DesignFactory.DualLayout, Version=1.2.0.0, Culture=neutral, PublicKeyToken=077f92bbf864a536" %>   <!DOCTYPE html> <html class="no-js">       <head>         <meta charset="utf-8" />         <meta http-equiv="X-UA-Compatible" content="IE=Edge" />         <title><SharePointWebControls:FieldValue FieldName="Title" runat="server"/></title>           <script type="text/javascript">             document.createElement('header');             document.createElement('nav');             document.createElement('article');             document.createElement('hgroup');             document.createElement('aside');             document.createElement('section');             document.createElement('footer');             document.createElement('figure');             document.createElement('time');         </script>           <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>     </head>          <body>                  <header>             <div class="logo">Logo</div>             <h1>SiteTitle</h1>             <nav>                 <a href="#">SiteMenu 1</a>                 <a href="#">SiteMenu 2</a>                 <a href="#">SiteMenu 3</a>                 <a href="#">SiteMenu 4</a>                 <a href="#">SiteMenu 5</a>                 <sdl:SwitchToWcmModeLinkButton runat="server" Text="…"/>             </nav>             <div class="tagline">Tagline</div>             <form>                 <label>Zoek</label>                 <input type="text" placeholder="Voer een zoekterm in...">                 <button>Zoek</button>                             </form>           </header>                  <div class="content">             <div class="pageContent">                 <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />             </div>         </div>              <footer>             <nav>                 <ul>                     <li><a href="#">FooterMenu 1</a></li>                     <li><a href="#">FooterMenu 2</a></li>                     <li><a href="#">FooterMenu 3</a></li>                     <li><a href="#">FooterMenu 4</a></li>                     <li><a href="#">FooterMenu 5</a></li>                 </ul>             </nav>             <small>Copyright &copy; 2011 Macaw</small>         </footer>     </body> </html> Note that if no specific WCM-mode master page is specified (html5simple-wcm.master), the default v4.master master page will be used in WCM-mode. Create a WCM-mode page layout html5simplePage-wcm.aspx with the following code: html5simplePage-wcm.aspx <%@ Page language="C#"     Inherits="DesignFactory.DualLayout.WcmModeLayoutPage, DesignFactory.DualLayout, Version=1.2.0.0, Culture=neutral, PublicKeyToken=077f92bbf864a536" %> <%@ Register Tagprefix="SharePointWebControls"              Namespace="Microsoft.SharePoint.WebControls"              Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages"              Namespace="Microsoft.SharePoint.WebPartPages"              Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingWebControls"              Namespace="Microsoft.SharePoint.Publishing.WebControls"              Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation"              Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">     <SharePointWebControls:FieldValue id="PageTitle" FieldName="Title" runat="server"/> </asp:Content> <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server"> </asp:Content> Notice the Inherits at line two. Instead of inheriting from Microsoft.SharePoint.Publishing.PublishingLayoutPage we need to inherit from DesignFactory.DualLayout.WcmModeLayoutPage. Create a view-mode page layout html5simplePage.aspx with the following code: html5simplePage.aspx html5simplePage.aspx <%@ Page language="C#"          Inherits="DesignFactory.DualLayout.ViewModeLayoutPage, DesignFactory.DualLayout,                     Version=1.2.0.0, Culture=neutral, PublicKeyToken=077f92bbf864a536" %> <%@ Register Tagprefix="SharePointWebControls"              Namespace="Microsoft.SharePoint.WebControls"              Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages"              Namespace="Microsoft.SharePoint.WebPartPages"              Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingWebControls"              Namespace="Microsoft.SharePoint.Publishing.WebControls"              Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation"              Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server" /> <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">     The title of the page is: <SharePointWebControls:FieldValue id="PageTitleInContent" FieldName="Title" runat="server"/> </asp:Content> Notice the Inherits at line two. Instead of inheriting from Microsoft.SharePoint.Publishing.PublishingLayoutPage we need to inherit from DesignFactory.DualLayout.ViewModeLayoutPage. Set the html5simple.master master page as the Site Master Page Set the allowed page layouts to the Html5 Simple Page page layout and set the New Page Default Settings also to Html5 Simple Page so new created pages are also of this page layout. Note that the Html5 Simple Page page layout is initially not selectable for New Page Default Settings. Save this configuration page first after selecting the allowed page layouts, then open again and select the default new page. Under Site Actions select the New Page action. Create a page Home.aspx of the default page layout type Html5 Simple Page. Set the new created Home.aspx page as Welcome Page. Navigate to the site http://csm.html5demo.local and see the home page in the WCM display and edit mode. Select Switch to View Mode under Site Actions to see the resulting page in view-mode. Select the three dots (…) at the right side of the menu to switch back to WCM-mode. Have a look at the source view of the resulting web page and admire the clean HTML. No SharePoint specific markup or CSS files! Clean HTML in page <!DOCTYPE html> <html class="no-js">     <head>         <meta charset="utf-8" />         <meta http-equiv="X-UA-Compatible" content="IE=Edge" />         <title>Home</title>         <script type="text/javascript">             document.createElement('header');             document.createElement('nav');             document.createElement('article');             document.createElement('hgroup');             document.createElement('aside');             document.createElement('section');             document.createElement('footer');             document.createElement('figure');             document.createElement('time');         </script>              </head>          <body>                  <header>             <div class="logo">Logo</div>             <h1>SiteTitle</h1>             <nav>                 <a href="#">SiteMenu 1</a>                 <a href="#">SiteMenu 2</a>                 <a href="#">SiteMenu 3</a>                 <a href="#">SiteMenu 4</a>                 <a href="#">SiteMenu 5</a>                 <a href="/Pages/Home.aspx?DualLayout_ShowInWcmMode=true">…</a>             </nav>             <div class="tagline">Tagline</div>             <form>                 <label>Zoek</label>                 <input type="text" placeholder="Voer een zoekterm in...">                 <button>Zoek</button>                             </form>         </header>                  <div class="content">             <div class="pageContent">                      The title of the page is: Home             </div>         </div>              <footer>             <nav>                 <ul>                     <li><a href="#">FooterMenu 1</a></li>                     <li><a href="#">FooterMenu 2</a></li>                     <li><a href="#">FooterMenu 3</a></li>                     <li><a href="#">FooterMenu 4</a></li>                     <li><a href="#">FooterMenu 5</a></li>                 </ul>             </nav>             <small>Copyright &copy; 2011 Macaw</small>         </footer>     </body> </html> <!-- Macaw DesignFactory DualLayout for SharePoint 2010 Trial version --> Note the link at line 37, this link will only be rendered for authenticated users and is our way to switch back to WCM-mode. This concludes our quick start to get DualLayout up an running in a matter of minutes. And what is the result: You can have the full SharePoint 2010 WCM publishing page editing experience to manage the content in your pages. You don’t have to delve into large SharePoint specific master pages and page layouts with a lot of knowledge of the does and don'ts with respect to SharePoint controls, scripts and stylesheets. The end-user gets a clean and light HTML page. Get your fully functional, non-timebombed trial copy of DualLayout and start creating!

    Read the article

  • highlight navigation PHP

    - by Kira
    I've launched a website a while back and successfully used Javascript + CSS to highlight the current page on the navigation. However, it is not working in Safari and it does not validate well, when using Javascript, so I decided to have PHP assign the CSS id to the HTML elements. So far, it works fine, compared to the other times where there was two of each link displayed, when it was attempted in PHP. My problem is that all links look normal and the CSS property is not applied. I have a feeling that it has to do with my PHP code, but I'm not certain. The site address is here As for the PHP code, here it is: <?php echo('<li><span class="bold">Main</span>'); echo('<ul>'); if ($page=="home") { echo('<li><a id="current" href="index.shtml">Home</a></li>'); } else { echo('<li><a href="index.shtml">Home</a></li>'); } if ($page=="faq") { echo('<li><a id="current" href="faq.shtml">FAQ</a></li>'); } else { echo('<li><a href="faq.shtml">FAQ</a></li>'); } if ($page=="about") { echo('<li><a id="current" href="about.shtml">About Bryce</a></li>'); } else { echo('<li><a href="about.shtml">About Bryce</a></li>'); } echo('<li><a href="contact.php">Contact Bryce</a></li>'); if ($page=="sign guestbook") { echo('<li><a id="current" href="sign.shtml">Sign Guestbook</a></li>'); } else { echo('<li><a href="sign.shtml">Sign Guestbook</a></li>'); } if ($page=="view guestbook") { echo('<li><a id="current" href="view.shtml">View Guestbook</a></li>'); } else { echo('<li><a href="view.shtml">View Guestbook</a></li>'); } echo('</ul>'); echo('</li>'); echo('<li><span class="bold">Info</span>'); echo('<ul>'); if ($page=="projects") { echo('<li><a id="current" href="projects.shtml">Projects</a></li>'); } else { echo('<li><a href="projects.shtml">Projects</a></li>'); } if ($page=="books") { echo('<li><a id="current" href="books.shtml">Books</a></li>'); } else { echo('<li><a href="books.shtml">Books</a></li>'); } echo('</ul>'); echo('</li>'); echo('<li><span class="bold">Misc.</span>'); echo('<ul>'); if ($page=="cover designs") { echo('<li><a id="current" href="coverdesigns.shtml">Cover Designs</a></li>'); } else { echo('<li><a href="coverdesigns.shtml">Cover Designs</a></li>'); } echo('<li><a target="_blank" href="http://www.lulu.com/brycecampbellsbooks">Lulu Store</a></li>'); echo('<li><a href="rss/">RSS</a></li>'); echo('</ul>'); echo('</li>'); ?> In order to give you guys an idea of what the highlighting effect should look like, here is the CSS that is supposed to be applied to the current page: #current { font-style: italic; text-decoration: none; color: #000000; } When looking up what I was doing wrong, it told me that I was implementing it right, but it does not seem that the PHP is getting the values.

    Read the article

  • jQuery navigation with childs and grandchilds

    - by Ayrton
    Hello I'm trying to create a little menu for navigation. Some of the menu items (level 0) have possibly children (level 1) and grandchildren (level 2). (see the html code below). All I would like to make the level 1 elements visible with a click event on the level 0 elements. When hovering on level 1 elements the level 2 elements (children from the hovered level 1 element) should become visible but with a little delay (like 1 sec.) and then if you 'unhover' on that one it will take 1 second to disappear the level 2 elements that way if you accidently unhover the level 1 element it won't punish you for it because you have 1 sec to hover it again. so if you slide across all of them, it will only pop up the one you kept your mouse on initially. I would be pleased if something could help me out ps: I preferably have a solution with jQuery. <ul> <li> <a href="#">menu item</a> <ul> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a> <ul> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> </ul> </li> <li> <a href="#">menu item</a> <ul> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> </ul> </li> <li class=""> <a href="#">menu item</a> <ul> <li class="first"><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> <li><a href="#">menu item</a></li> </ul> </li> </ul> </li> <li> <a href="#">menu item</a> </li> <li> <a href="#">menu item</a> </li> </ul>

    Read the article

  • Why is the dropdown menu aligned to the left?

    - by fmz
    I am working on a dropdown navigation for a site and am having some trouble with the dropdown portion aligning with the parent category - it shifts all the way to the left. Here is the html: <ul class="dropdown"> <li><a href="#" id="home">Home</a></li> <li><a href="#" id="about">About Us</a> <ul class="sub-menu"> <li><a href="#">Our History</a></li> <li><a href="#">Our Process</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Financing</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Subcontractors</a></li> </ul> </li> <li><a href="#" id="personal">Personal Banking</a></li> <li><a href="#" id="commercial">Commercial Banking</a></li> <li><a href="#" id="service">Customer Service</a> <ul class="sub-menu"> <li><a href="#">Our History</a></li> <li><a href="#">Our Process</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Financing</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Subcontractors</a></li> </ul> </li> <li><a href="#" id="investors">Investor Relations</a></li> <li><a href="#" id="contact">Contact Us</a></li> </ul> Here is the CSS: ul.dropdown { position: relative; background: #4e8997; height: 40px; padding-left: 5px; } ul.dropdown li { float: left; zoom: 1; } ul.dropdown li a { display: block; margin-top: 5px; padding: .5em .6em; color: #fff; font: bold 14px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; text-transform: uppercase; border: none; } ul.dropdown a:hover { background-color: #c29c5d; color: #fff; } ul.dropdown a:active { background-color: #c29c5d; color: #fff; } /* LEVEL TWO */ ul.dropdown ul { width: 200px; visibility: hidden; position: absolute; top:100%; left: 0; } ul.dropdown ul li { font: 13px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; border-bottom: 1px solid #ccc; float: none; color: #fff; background-color: #c29c5d; height: 20px; } ul.dropdown ul li a { display: inline-block; } ul.dropdown ul li a:hover { background-color: #a2834d; color: #fff; height: 20px; } I tried changing the ul.dropdown ul to position relative, but that breaks the navigation. I would appreciate some help getting this corrected. Thanks.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >