Search Results

Search found 3117 results on 125 pages for 'nan li'.

Page 15/125 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • jQuery expanding menu

    - by Milen
    Hi everybody, i have this html code: <ul id="nav"> <li>Heading 1 <ul> <li>Sub page A</li> <li>Sub page B</li> <li>Sub page C</li> </ul> </li> <li>Heading 2 <ul> <li>Sub page D</li> <li>Sub page E</li> <li>Sub page F</li> </ul> </li> </ul> With this JS code: $(function(){ $('#nav>li>ul').hide(); $('#nav>li').mouseover(function(){ if ($('#nav ul:animated').size() == 0) { $heading = $(this); $expandedSiblings = $heading.siblings().find('ul:visible'); if ($expandedSiblings.size() > 0) { $expandedSiblings.slideUp(500, function(){ $heading.find('ul').slideDown(500); }); } else { $heading.find('ul').slideDown(1000); } } }); }) For now the code works this way: When click on Heading 1, menu is expanded. When click on Heading 2, heading2 submenu menu is expanded and heading 1 submenu is closed. I need to rework it to this: Submenus must be closed automatically on mouseout. Can somebody help me? Thanks in advance!

    Read the article

  • Convert plain text list to html

    - by morbusg
    So I have a plain text list like this: I am the first top-level list item I am his son Me too Second one here His son His daughter I am the son of the one above Me too because of the indentation Another one And I would like to turn that into: <ul> <li>I am the first top-level list-item <ul> <li>I am his son</li> <li>Me too</li> </ul> </li> <li>Second one here <ul> <li>His son</li> <li>His daughter <ul> <li>I am the son of the one above</li> <li>Me too because of the indentation</li> </ul> </li> <li>Another one</li> </ul> </li> </ul> How would one go about doing that?

    Read the article

  • Adding Another Parameter to my Custom jQuery Gallery

    - by steve
    My website currently uses a custom jQuery gallery system that I've developed... it works well, but I want to add one capability that I can't seem to figure out. I want the user to, instead of having to click each thumbnail, also be able to click the full image itself to advance in the gallery. Working gallery is here: http://www.studioimbrue.com The code is as follows: $('.thumbscontainer ul li a').click(function() { var li_index = $(this).parents('ul').children('li').index($(this).parent("li"));    $(this).parents('.thumbscontainer').parent().find('.captions ul li').fadeOut(); $(this).parents('.thumbscontainer').parent().find('.captions ul li:eq('+li_index+')').fadeIn(); }); }); and the gallery HTML markup is as follows: <div class="container"> <div class="captions" id="usbdrive"> <ul> <li style="display:block"> <img src="images/portfolio/usbdrive/1.jpg" /> <div class="caption"> <span class='projecttitle'>Super Talent USB Drive Package.</span> A fancy, lavish package designed for Super Talent's specialty USB drive. It was known as the world's smallest flash drive <span class="amp">&amp;</span> it is dipped in gold! </div> </li> <li> <img src="images/portfolio/usbdrive/2.jpg" /> </li> <li> <img src="images/portfolio/usbdrive/3.jpg" /> </li> <li> <img src="images/portfolio/usbdrive/4.jpg" /> </li> <li> <img src="images/portfolio/usbdrive/5.jpg" /> </li> </ul> </div> <div class="thumbscontainer verticalthumbs"> <ul> <li><a href="javascript:void(0);" name="usbdrive1"><img src="images/portfolio/usbdrive/1.jpg" /></a></li> <li><a href="javascript:void(0);" name="usbdrive2"><img src="images/portfolio/usbdrive/2.jpg" /></a></li> <li><a href="javascript:void(0);" name="usbdrive3"><img src="images/portfolio/usbdrive/3.jpg" /></a></li> <li><a href="javascript:void(0);" name="usbdrive4"><img src="images/portfolio/usbdrive/4.jpg" /></a></li> <li><a href="javascript:void(0);" name="usbdrive5"><img src="images/portfolio/usbdrive/5.jpg" /></a></li> </ul> </div> </div>

    Read the article

  • What causes this error? "CALayer position contains NaN: [240 nan]"

    - by Kevlar
    I've seen this happen whenever i rotate a screen that has a UITableView on it. I've found out that it happens inbetween the willRotate and didRotate method calls in UIViewController My co-workers have seen it in other spots as well, usually around rotation. It hadnt started happening until very recently, and we're stumped as to how we should deal with it (google searches don't turn up the error message in its exact form). Has anyone else encountered this that knows what to do about it?

    Read the article

  • Double type returns -1.#IND/NaN error when calculating pi iteratively

    - by Draak
    I am working through a problem for my MCTS certification. The program has to calculate pi until the user presses a key, at which point the thread is aborted, the result returned to the main thread and printed in the console. Simple enough, right? This exercise is really meant to be about threading, but I'm running into another problem. The procedure that calculates pi returns -1.#IND. I've read some of the material on the web about this error, but I'm still not sure how to fix it. When I change double to Decimal type, I unsurprisingly get Overflow Exception very quickly. So, the question is how do I store the numbers correctly? Do I have to create a class to somehow store parts of the number when it gets too big to be contained in a Decimal? Class PiCalculator Dim a As Double = 1 Dim b As Double = 1 / Math.Sqrt(2) Dim t As Double = 1 / 4 Dim p As Double = 1 Dim pi As Double Dim callback As DelegateResult Sub New(ByVal _callback As DelegateResult) callback = _callback End Sub Sub Calculate() Try Do While True Dim a1 = (a + b) / 2 Dim b1 = Math.Sqrt(a * b) Dim t1 = t - p * (a - a1) ^ 2 Dim p1 = 2 * p a = a1 b = b1 t = t1 p = p1 pi = ((a + b) ^ 2) / (4 * t) Loop Catch ex As ThreadAbortException Finally callback(pi) End Try End Sub End Class

    Read the article

  • Div not floating left

    - by Davey
    Can't seem to get this div to move to the left. Using wordpress. I tried a lot of things but am at a loss. Here is the css for the div: #portfolio li img { position: absolute; float: left; margin: 34px 50px 0 0; width: 942px; } Here is the header.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Davey Whitney [email protected] --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" /> <link rel="stylesheet" type="text/css" href="wp-content/themes/zenlite/layout.css" media="screen" /> <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/print.css" media="print" /> <link rel="stylesheet" type="text/css" href="wp-content/themes/zenlite/color.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.kwicks-1.5.1.js"></script> <script type="text/javascript" src="js/jquery.innerfade.js"></script> <script type="text/javascript" src="js/custom.js"></script> <title> Wildfire </title> <script type="text/javascript" src="http://wfithaca.com/js/jquery.lavalamp.js"></script> <script type="text/javascript" src="http://wfithaca.com/js/jquery.easing.1.1.js"></script> <script type="text/javascript" src="http://wfithaca.com/js/jquery.cycle.all.min.js"></script> <script type="text/javascript"> function my_kwicks(){ $('.kwicks').kwicks({ duration: 300, max: 200, spacing: 0 }); } $(document).ready(function(){ my_kwicks(); }); </script> <script type="text/javascript"> $(document).ready( function(){ $('ul#portfolio').innerfade({ speed: 1000, timeout: 5000, type: 'sequence', }); }); </script> </script> <script type="text/javascript"> $(document).ready(function(){ $('li.headlink').hover( function() { $('ul', this).css('display', 'block'); }, function() { $('ul', this).css('display', 'none'); }); }); </script> </head> <body> <div id="wrapper"> <div id="header"> <ul id="portfolio"> <li> <img src="http://wfithaca.com/images/banner1.png" /> </li> <li> <img src="http://wfithaca.com/images/banner1.png" /> </li> <li> <img src="http://wfithaca.com/images/banner1.png" /> </li> </ul> </div> <div id="navigation"> <div id="kwickbar"> <ul class="kwicks"> <li id="kwick1"><a href="#">Home</a></li> <li id="kwick2"><a href="#">Menu</a></li> <li id="kwick3"><a href="#">Events</a></li> <li id="kwick4"><a href="#">Friends</a></li> <li id="kwick5"><a href="#">Contact</a></li> </ul> </div> </div> Here is the stylesheet: html,body { font-family:Tahoma, Verdana,Arial, Helvetica, sans-serif; font-size:100%; padding:0; color:#fff; border-style:none; } a { text-decoration:none; } a:hover,a:active,a:focus { text-decoration:none; } ul li { list-style-type:none; } ul.dbem_events_list a:link {color: #A32725; text-decoration: underline; } ul.dbem_events_list a:visited {color: #A32725; text-decoration: underline; } ul.dbem_events_list a:hover {color: #ffffff; text-decoration: none; } ul.dbem_events_list{text-decoration:none; list-style-type:none;} ul li ul li { list-style-type:none; } ul li ul li ul li { list-style-type: none; } q:before, q:after { content:""; } #wrapper { width:986px; margin: 0 auto; } #header { background-image:url('images/headframe.png'); width:986px; height:271px; } #kwickbar { padding: 25px 0 0 25px; } #navigation { width:984px; height: 100px; background-color: #000000; text-decoration:none; margin-left:1px; } .update-post { float:left; width:100px; } #content { float:left; height:100%; width:984px; background-color: #000000; text-decoration:none; margin-left:1px; } #postcontent{ height:100%; width:100%; } #content .post { float:left; width:90px; } #content .page,#content .attachment,.postcontent { color:#fff; width:720px; margin-top:15px; margin-left:30px; float:left; text-decoration:none; } .photo { width: 250px; height:700px; background-color:#000000; margin:0 0 0 880px; } .slideshow { height: 232px; width: 232px; margin:0 0 0 880px; } .slideshow img { border: 5px solid #000; } .post-title { margin:0; padding:0; } .post-title a { text-decoration:none; } .post-title a:hover,.post-title a:active,.post-title a:focus { text-decoration:underline; } #content .meta li,#content .prevnext li,#content .gallery li { list-style-image:none; list-style:none; } .meta { margin:5px 0 0; padding:0; font-size:.85em; } .meta ul,.meta li { margin:0; padding:0; } .meta ul { display:inline; } .meta li li { display:inline; padding-right:.3em; } .postfoot { clear:both; margin-bottom:20px; padding-bottom:10px; line-height:1.2em; } .author .posts-by { padding-top:10px; } #footer { clear:both; margin:0; padding:0 0 5px; text-align:center; font-size:.8em; border: 0; width:960px; } #footer ul { clear:both; margin:0; padding:0; } #footer li { display:inline; margin:0; padding:0 5px; } #footer li.rss { position:relative; top:3px; } .copyright { padding:50px 0 0 0; font-family:verdana; color:#ffffff; text-align:left; width:800px; font-size:0.8em; } .copyright a { text-decoration:none; color:#7E0000; font-weight:600; } .copyright a:hover { color:#C0D341; } . .postcontent p { text-decoration:none; border:0; border-style:none; } .postcontent p a:hover { color:#fff; } .kwicks { list-style-type: none; list-style-position:outside; position: relative; margin: 0; padding: 0; } .kwicks li{ display: block; overflow: hidden; padding: 0; cursor: pointer; float: left; width: 125px; height: 40px; margin-right: 0px; background-image:url('http://wfithaca.com/images/kwicks.jpg'); background-repeat:no-repeat; } .kwicks a{ display:block; height:40px; text-indent:-9999px; outline:none; } #kwick1 { background-position:0px 0px; } #kwick2 { background-position:-200px 0px; } #kwick3 { background-position:-400px 0px; } #kwick4 { background-position:-600px 0px; } #kwick5 { background-position:-800px 0px; } #kwick1.active, #kwick1:hover { background-position: 0 bottom; } #kwick2.active, #kwick2:hover{ background-position: -200px bottom; } #kwick3.active, #kwick3:hover { background-position: -400px bottom; } #kwick4.active, #kwick4:hover { background-position: -600px bottom; } #kwick5.active, #kwick5:hover { background-position: -800px bottom; } #portfolio li img { position: absolute; float: left; margin: 34px 50px 0 0; width: 942px; } Just want the #portfolio li img div to move to the left a bit. any help would be greatly appreciated.

    Read the article

  • Visual Studio - How to disable autoformat/correct while running macro?

    - by Sam
    When running a macro that changes the selected text, tags are automatically closed and the text formatted. How can I prevent that from happening? For example, wrapping text in a tag: DTE.ActiveDocument.Selection.Text = String.Format("<tag>{0}</tag>", DTE.ActiveDocument.Selection.Text) Ends up with two closing tags: <tag>Text</tag></tag> Even stranger, multiple lines fails: <li>One</li> <li>Two</li> <li>Three</li> An ends up as <ul> <li>One</li> <li>Two</li> <li>Three</li></li></ul> How can I prevent that? As can be seen by the last example, the formatting is wrong and there is an extra </li>

    Read the article

  • What is the semantically correct way to use the `<article>` tag in HTML 5, with `<ol>, <ul>, and <li

    - by viatropos
    I currently have an ordered list that I want to markup using the new HTML 5 attributes. It looks like this: <ol class="section"> <li class="article"> <h2>Article A</h2> <p>Some text</p> </li> <li class="article"> <h2>Article B</h2> <p>Some text</p> </li> <li class="article"> <h2>Article C</h2> <p>Some text</p> </li> </ol> It seems the only way to keep the list AND use HTML 5 tags is to add a whole bunch of unnecessary divs: <section> <ol> <li> <article> <h2>Article A</h2> <p>Some text</p> </article> </li> <li> <article> <h2>Article B</h2> <p>Some text</p> </article> </li> <li> <article> <h2>Article C</h2> <p>Some text</p> </article> </li> </ol> </section> Is there a better way to do this? What are your thoughts?

    Read the article

  • Why is FLD1 loading NaN instead?

    - by Bernd Jendrissek
    I have a one-liner C function that is just return value * pow(1.+rate, -delay); - it discounts a future value to a present value. The interesting part of the disassembly is 0x080555b9 : neg %eax 0x080555bb : push %eax 0x080555bc : fildl (%esp) 0x080555bf : lea 0x4(%esp),%esp 0x080555c3 : fldl 0xfffffff0(%ebp) 0x080555c6 : fld1 0x080555c8 : faddp %st,%st(1) 0x080555ca : fxch %st(1) 0x080555cc : fstpl 0x8(%esp) 0x080555d0 : fstpl (%esp) 0x080555d3 : call 0x8051ce0 0x080555d8 : fmull 0xfffffff8(%ebp) While single-stepping through this function, gdb says (rate is 0.02, delay is 2; you can see them on the stack): (gdb) si 0x080555c6 30 return value * pow(1.+rate, -delay); (gdb) info float R7: Valid 0x4004a6c28f5c28f5c000 +41.68999999999999773 R6: Valid 0x4004e15c28f5c28f6000 +56.34000000000000341 R5: Valid 0x4004dceb851eb851e800 +55.22999999999999687 R4: Valid 0xc0008000000000000000 -2 =R3: Valid 0x3ff9a3d70a3d70a3d800 +0.02000000000000000042 R2: Valid 0x4004ff147ae147ae1800 +63.77000000000000313 R1: Valid 0x4004e17ae147ae147800 +56.36999999999999744 R0: Valid 0x4004efb851eb851eb800 +59.92999999999999972 Status Word: 0x1861 IE PE SF TOP: 3 Control Word: 0x037f IM DM ZM OM UM PM PC: Extended Precision (64-bits) RC: Round to nearest Tag Word: 0x0000 Instruction Pointer: 0x73:0x080555c3 Operand Pointer: 0x7b:0xbff41d78 Opcode: 0xdd45 And after the fld1: (gdb) si 0x080555c8 30 return value * pow(1.+rate, -delay); (gdb) info float R7: Valid 0x4004a6c28f5c28f5c000 +41.68999999999999773 R6: Valid 0x4004e15c28f5c28f6000 +56.34000000000000341 R5: Valid 0x4004dceb851eb851e800 +55.22999999999999687 R4: Valid 0xc0008000000000000000 -2 R3: Valid 0x3ff9a3d70a3d70a3d800 +0.02000000000000000042 =R2: Special 0xffffc000000000000000 Real Indefinite (QNaN) R1: Valid 0x4004e17ae147ae147800 +56.36999999999999744 R0: Valid 0x4004efb851eb851eb800 +59.92999999999999972 Status Word: 0x1261 IE PE SF C1 TOP: 2 Control Word: 0x037f IM DM ZM OM UM PM PC: Extended Precision (64-bits) RC: Round to nearest Tag Word: 0x0020 Instruction Pointer: 0x73:0x080555c6 Operand Pointer: 0x7b:0xbff41d78 Opcode: 0xd9e8 After this, everything goes to hell. Things get grossly over or undervalued, so even if there were no other bugs in my freeciv AI attempt, it would choose all the wrong strategies. Like sending the whole army to the arctic. (Sigh, if only I were getting that far.) I must be missing something obvious, or getting blinded by something, because I can't believe that fld1 should ever possibly fail. Even less that it should fail only after a handful of passes through this function. On earlier passes the FPU correctly loads 1 into ST(0). The bytes at 0x080555c6 definitely encode fld1 - checked with x/... on the running process. What gives?

    Read the article

  • Jquery return element html instead of content

    - by jim smith
    I have something like this <ul> <li class="aclass" id="a">content</li> <li class="aclass" id="b">content</li> <li class="aclass" id="c">content</li> <li class="aclass" id="d">content</li> <li class="aclass" id="e">content</li> <li class="aclass" id="f">content</li> </ul> I have code like $(".aclass").live("mousedown",function() { alert($this.html()); }); This will alert the content, what I would like to do is alert the entire element like <li class="aclass" id="f">content</li> I've tried $(this).parent() but that returns the whole UL

    Read the article

  • Javascript get li values and encode them

    - by bluedaniel
    At the moment I have two (maybe more) unordered lists which are sortable with jquery and ui. The things that work are that the lists are connected, items are draggable, items can be removed and a form that adds to the list. What I need however is a function that gets all the content for li items and json encode them ready to be sent off to some db function, or something. Im new to jquery however and cant find documentation for li items. Hope Ive explained this well. Daniel

    Read the article

  • custom error message using (bassistance.de form validation)

    - by Abu Hamzah
    How can I add a custom error message to my .aspx. Is there a way to make it template for other pages to use? Here is how my .aspx page looks like: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="validation.aspx.cs" Inherits="Web.validation" %> <br> < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br> < html xmlns="http://www.w3.org/1999/xhtml" > <br> < head id="Head1" runat="server"><br> <title>Untitled Page</title><br> < /head><br> < body><br> < form id="form1" runat="server"><br> < div><br> < li><br> < label id="lblFirstName" for="FirstName"><br> First Name : < /label> < input id="FirstName" name="FirstName" type="text" maxlength="25" class="required" /><em><img src="images/required.png" alt="required" /></em> </li> <li><br> < label id="lbllastName" for="LastName"><br> Last Name : < /label><br> < input id="LastName" name="LastName" type="text" maxlength="25" class="required" /><em><img src="images/required.png" alt="required" /></em> </li><br> <li><br> < label id="lblAddr1" for="Addr1"> Address : < /label><br> <input id="Addr1" name="Addr1" type="text" maxlength="25" /> </li> <li> <label id="lblAddr2" for="Addr2"> Address 2 : </label> <input id="Addr2" name="Addr2" type="text" maxlength="25" /> </li> <li> <label id="lblZip" for="txtZip"> Zip : </label> <input id="txtZip" name="txtZip" type="text" class="ZipCodeMask" /> </li> <li> <label id="lblCity" for="City"> City : </label> <input id="City" name="City" type="text" maxlength="25" /> </li> <li> <label id="lblState" for="State"> State : </label> <input id="txtState" name="txtState" type="text" maxlength="25" /> </li> <li> <label id="lblPhone" for="txtPhone"> Phone : </label> <input id="txtPhone" type="text" name="txtPhone" class="phone PhoneMask" /> </li> <li> <label id="lblEmail" for="EMail"> E-Mail : </label> <input id="EMail" name="EMail" type="text" maxlength="100" class="required email" /><em><img src="images/required.png" alt="required" /></em> </li> <li> <label id="lblComment" for="Comment"> Comment or Question : </label> <textarea id="Comment" name="Comment" cols="40" rows="6" class="required"></textarea><em> <img src="images/required.png" alt="required" /></em> </li> <li> <ul> <li> <button id="btnCancel" name="btnCancel" type="button"> Cancel</button></li> <li> <button id="btnReset" name="btnReset" type="reset"> Reset</button></li> <li> <button id="btnSubmit" name="btnSubmit" type="submit"> Submit</button></li> </ul> </li> </div> </form> <script src="js/jquery.validate.min.js" type="text/javascript"></script> </body> </html>

    Read the article

  • pagerAnchorBuilder - trying to add classes

    - by Bert Murphy
    I'm using Cycle2 to build a carousel gallery and I've run into a little problem regarding styling the pager buttons. What I've gathered is that Cycle2 creates its own pager span tags for each slide which is a bummer becaus I've already styled my the sub-nav markup. This should be a minor issue as long as I can assign individual classes to the spans and change my css accordingly. However, I can't get this to work. TLDR: I was hoping that I could use pagerAnchorBuilder to create individual classes for each span. I can't. Help. The original markup (pre Cycle2) looks like the following: <div id ="sub-nav" class="sub-nav"> <ul> <li><a id="available" class="available" href="#"></a></li> <li><a id="reliable" class="reliable" href="#"></a></li> <li><a id="use" class="use" href="#"></a></li> <li><a id="reports" class="reports" href="#"></a></li> <li class="last"><a id="software" class="software" href="#"></a></li> </ul> </div> With Cycle2 it looks like this (note the addition of the span tags) <div id ="sub-nav" class="sub-nav"> <ul> <li><a id="available" class="available" href="#"></a></li> <li><a id="reliable" class="reliable" href="#"></a></li> <li><a id="use" class="use" href="#"></a></li> <li><a id="reports" class="reports" href="#"></a></li> <li class="last"><a id="software" class="software" href="#"></a></li> </ul> <span class="cycle-pager-active">•</span><span>•</span><span>•</span><span>•</span><span>•</span></nav> </div> Cycle2 $('#sliding-gallery ul').cycle({ fx: 'carousel', carouselVisible: 1, speed: 'fast', timeout: 10000, slides: '>li', next: '.next', prev: '.prev', pager: '.sub-nav', pagerAnchorBuilder: function(idx, slide) { return '.sub-nav span:eq(' + idx + ')'; } });

    Read the article

  • Uncaught syntax error: Adding <li> elements to an <ul>

    - by ThePagan
    I keep getting an uncaught syntex error which I know usually means your code has a missing closing something. I keep failing to see what it is that I am missing. The idea of the function is that it extracts the a links ID and Text content and add's it to an un-ordered list. The links have a class of 'ingredient_add' and the unordered list has an ID of 'ingredientsAdded'. I can't see what I've missed here. $(document).ready(function() { $('.ingredient_add').click(function() { event.preventDefault(); var id = this.id; var value = this.text(); $('#ingredientsAdded').append("<li id='"+id+"'>"+value+"</li>"); }); //end add to list }); // end document ready()

    Read the article

  • Jquery li element id

    - by Gazler
    Hi, I am using a jquery contextmenu plugin for right click menus which I am trying to add to each li element of an unordered list with the ID mailbox. The code I have is: $("#mailbox > li").contextMenu('myMenu1', { bindings: { 'open': function(t) { alert('Trigger was '+t.id+'\nAction was Open'); } //CODE SNIPPED }); My assumption is that this should alert the id of the list element that the contextMenu was called from, however it is returning an empty string. Am I accessing/assigning these correctly? t is an object HTMLLIElement in the context above by the way. Cheers, Gazler.

    Read the article

  • jQuery: How to determine which <li> tag was clicked?

    - by user337909
    I am creating a form with 5 lines of text, and each text I am allowing the user to select if they want the text to be centered, left, or right justified. I have a unnumbered list with list elements x5. <li><img src="images/justify_left.png" alt="left" /><span>Justify Left</span></li> <li><img src="images/justify_center.png" alt="center" /><span>Justify Left</span></li> <li><img src="images/justify_right.png" alt="right" /><span>Justify Left</span></li> Each of the 5 set of <li> items refers to its respective line. With jQuery, how would I go about determining which of the 15 <li> items did the user select so that I can correspond the proper justification as a post method?

    Read the article

  • I'm learning html and I'm confused as to how href's work. [migrated]

    - by Robolisk
    Okay so i'm learning html right now and soon css. In my html coding I have a section like this for navigation: <div id="header"> <h1>Guild Wars 2 Fanbase</h1> <ol id="navigation"> <li><a href="/">Home</a></li> <li><a href="/facts">Facts</a></li> <li><a href="/gallery">Gallery</a></li> <li><a href="/code">Coding</a> <ul><li><a href="/code/line">Lines</a></li> <li><a href="/code/comment">Comment Lines</a></li> </ul> </li> </ol></div> Now when I open up this .html file this is all layed out the way I want it too look (the mark up that is). My question is this, when I click on a link on this site (this site being this code) I get an a error saying this webpage is not found, but of course. But how do I create it so I can have the web pages working together? I'm not sure how to word it correctly. Like, do I create another .html file in the same directory so somehow when I click the link it reads from the second .html file? If you not sure what I'm asking, just let me know and I'll try to be more specific. Thank you for your help (: excuse my mistakes in grammar, not the worlds best in English, trying my best (:

    Read the article

  • Ad-hoc String Manipulation With Visual Studio

    - by Liam McLennan
    Visual studio supports relatively advanced string manipulation via the ‘Quick Replace’ dialog. Today I had a requirement to modify some html, replacing line breaks with unordered list items. For example, I need to convert: Infrastructure<br/> Energy<br/> Industrial development<br/> Urban growth<br/> Water<br/> Food security<br/> to: <li>Infrastructure</li> <li>Energy</li> <li>Industrial development</li> <li>Urban growth</li> <li>Water</li> <li>Food security</li> This cannot be done with a simple search-and-replace but it can be done using the Quick Replace regular expression support. To use regular expressions expand ‘Find Options’, check ‘Use:’ and select ‘Regular Expressions’ Typically, Visual Studio regular expressions use a different syntax to every other regular expression engine. We need to use a capturing group to grab the text of each line so that it can be included in the replacement. The syntax for a capturing group is to replace the part of the expression to be captured with { and }. So my regular expression: {.*}\<br/\> means capture all the characters before <br/>. Note that < and > have to be escaped with \. In the replacement expression we can use \1 to insert the previously captured text. If the search expression had a second capturing group then its text would be available in \2 and so on. Visual Studio’s quick replace feature can be scoped to a selection, the current document, all open documents or every document in the current solution.

    Read the article

  • jQuery pop up problems

    - by user327137
    Hi all, I am creating a site from a template i purchased from TM for a beauty salon! I want to create an online booking form with the validations of name number service type but i'm having trouble getting a link to open that will pop up also using jquery NOT html how do i fix this... what is the code i have to insert so that when you click "BOOK NOW" a jquery pop up appears in the centre of the page and it has a booking form on it.... i have googled and googled but it is all new to me as in a NOOB at jquery.... here is a live demo of the template (template link for demo http://osc4.template-help.com/wt_31562/index.html#) and here is the code for where i am trying to place a pop up jquery <dt class="dt3"><a href="#"></a><img src="images/shadow.png" alt="" class="shadow"></dt> <dd id="page3"> <div class="inner"> <div class="content"> <section class="col-1"> <h2>our services</h2> <p>Vintage Beauty</p> <p class="dark">We offer Free Consultation for Botox, Fillers, Medical Skin Peels, Cosmetic Surgery <br> & also specialise n body and skin care. </p> <img src="images/page2-img1.png" alt="" class="p2"> <a href="#" class="more">view more</a> </section> <section class="col-2"> <h2>services</h2> <ul class="list p2"> <li><a href="#">Fish Pedicures</a></li> <li><a href="#">Manicures</a></li> <li><a href="#">Pedicures</a></li> <li><a href="#">Waxing</a></li> <li><a href="#">Threading</a></li> <li><a href="#">Tanning</a></li> <li><a href="#">Body Massage</a></li> <li><a href="#">Nail/Eye Extensions</a></li> <li><a href="#">Eye Lash/Brow Tinting</a></li> <li><a href="#">Twinkle Toes</a></li> <li><a href="#">Teeth Whitening Kits</a></li> <li><a href="#">Hot Wax Specialists</a></li> </ul> **<a href="#" class="more">BOOK ONLINE NOW</a> </section>** </div> </div> </dd>

    Read the article

  • not able to style a ul inside a nav tag

    - by user1831677
    I am trying to make a nav menu for my website and have been using http://www.onextrapixel.com/2011/06/03/how-to-create-a-horizontal-dropdown-menu-with-html-css-and-jquery/ as a guide. It has worked fine but as soon as I try to add ( id="coolMenu" ) to the nav tag it stops working. I took it away from the ul tag and added it to the nav tag and it no longer works. It does not display anything at all. What am in doing wrong? Thanks. html code below: <nav id="coolMenu"> <ul> <li><a href="#">Lorem</a></li> <li><a href="#">Mauricii</a></li> <li> <a href="#">Periher</a> <ul class="noJS"> <li><a href="#">Hellenico</a></li> <li><a href="#">Genere</a></li> <li><a href="#">Indulgentia</a></li> </ul> </li> <li><a href="#">Tyrio</a></li> <li><a href="#">Quicumque</a></li> </ul> </nav> css below: /* Structure ------------------------------------------*/ #coolMenu, #coolMenu ul { list-style: none; } #coolMenu { float: left; } #coolMenu > li { float: left; } #coolMenu li a { display: block; height: 2em; line-height: 2em; padding: 0 1.5em; text-decoration: none; } #coolMenu ul { position: absolute; display: none; z-index: 999; } #coolMenu ul li a { width: 80px; } #coolMenu li:hover ul.noJS { display: block; } /* Main menu ------------------------------------------*/ #coolMenu { font-family: Arial; font-size: 12px; background: #2f8be8; } #coolMenu > li > a { color: #fff; font-weight: bold; } #coolMenu > li:hover > a { background: #f09d28; color: #000; } /* Submenu ------------------------------------------*/ #coolMenu ul { background: #f09d28; } #coolMenu ul li a { color: #000; } #coolMenu ul li:hover a { background: #ffc97c; }

    Read the article

  • Restructuring html with javascript

    - by tolborg
    I have a regular unordered list of links, which I would like to change using js <ul> <li><a href="#">Theme 1</a></li> <li><a href="#">Theme 2</a></li> <li><a href="#">Theme 3</a></li> <li><a href="#">Theme 4</a></li> <li><a href="#">Theme 5</a></li> <li><a href="#">Theme 6</a></li> <li><a href="#">Theme 7</a></li> <li><a href="#">Theme 8</a></li> <li><a href="#">Theme 9</a></li> <li><a href="#">Theme 10</a></li> <li><a href="#">Theme 11</a></li> <li><a href="#">Theme 12</a></li> </ul> I would like the following output: <div class="themes__row"> <div class="themes__item><a href="#">Theme 1</a></div> <div class="themes__item><a href="#">Theme 2</a></div> <div class="themes__item><a href="#">Theme 3</a></div> <div class="themes__item><a href="#">Theme 4</a></div> </div> <div class="themes__row"> <div class="themes__item><a href="#">Theme 5</a></div> <div class="themes__item><a href="#">Theme 6</a></div> <div class="themes__item><a href="#">Theme 7</a></div> <div class="themes__item><a href="#">Theme 8</a></div> </div> <div class="themes__row"> <div class="themes__item><a href="#">Theme 9</a></div> <div class="themes__item><a href="#">Theme 10</a></div> <div class="themes__item><a href="#">Theme 11</a></div> <div class="themes__item><a href="#">Theme 12</a></div> </div> I have tried a few different solutions back and forth, but it ends up being really messy, so I dont really have any code to show. How is this done in a clever way? The site is using jQuery 1.4.4 if that matters.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >