Search Results

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

Page 11/125 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • assigning width to li

    - by badnaam
    I am using jquery ui tabs, which requires the tabs to be <li> elements, by default at least. I only need 2 tabs, but I am not able to size them so that they are both equal and take up 100% of available width of the ul. here is my code. <div id="intro_tabs" class="tabs"> <ul id="intro_nav"> <li> <h3><a href ="#tabs-1" class="null_link"><%= t('home.index.what_is_it') %></a></h3> </li> <li> <h3><a href ="#tabs-2" class="null_link"><%= t('home.index.how_works') %></a></h3> </li> </ul> <div id="tabs-1"> <%= simple_format t 'home.index.what_intro_details' %> </div> <div id="tabs-2"> <div id="intro_accordion"> <h3><a href="#">Users</a></h3> <div> <%= t 'home.index.how_intro_details_user' %> </div> <h3><a href="#">Merchants</a></h3> <div> <%= t 'home.index.how_intro_details_merchant' %> </div> </div> </div> </div> I have tried using css property width:50%, on both li's but it doesn't work. Thanks

    Read the article

  • Programmatically Creating fieldset, ol/ul and li tags in ASP.Net, C#

    - by Matt
    Hi, I need to write an ASP.Net form which will produce the following HTML: <fieldset> <legend>Contact Details</legend> <ol> <li> <label for="name">Name:</label> <input id="name" name="name" class="text" type="text" /> </li> <li> <label for="email">Email address:</label> <input id="email" name="email" class="text" type="text" /> </li> <li> <label for="phone">Telephone:</label> <input id="phone" name="phone" class="text" type="text" /> </li> </ol> </fieldset> However, the fields which are to be added to the form will be determined at runtime, so I need to create the fieldset at runtime and add an ordered list and listitems to it, with labels, textboxes, checkboxes etc as appropriate. I can’t find standard ASP.Net objects which will create these tags. For instance, I’d like to do something like the following in C#: FieldSet myFieldSet = new FieldSet(); myFieldSet.Legend = “Contact Details”; OrderedList myOrderedList = new OrderedList(); ListItem listItem1 = new ListItem(); ListItem listItem2 = new ListItem(); ListItem listItem3 = new ListItem(); // code here which would add labels and textboxes to the ListItems myOrderedList.Controls.Add(listItem1); myOrderedList.Controls.Add(listItem2); myOrderedList.Controls.Add(listItem3); myFieldSet.Controls.Add(myOrderedList); Form1.Controls.Add(myFieldSet); Are there any standard ASP.Net objects which can produce this, or is there some other way of achieving the same result? Matt

    Read the article

  • Javascript: Change li class if checkbox is selected (on load)

    - by BoDiE2003
    I have this code on javascript side: function changeSelectionStyle(id) { if(document.getElementById(id).className != 'yes'){ document.getElementById(id).className = 'yes'; } else{document.getElementById(id).className = '';} } And this on html: <ul> <li id="selectedAuthorities-4_1li" class=""> <input type="checkbox" id="selectedAuthorities-4_1" name="selectedAuthorities" value="ROLE_ADD_COMMENT_TO_CV" checked="checked" onload="changeSelectionStyle(this.id + 'li');" onclick="changeSelectionStyle(this.id + 'li'); checkFatherSelection(this.id);"> <a href="#" onclick="document.getElementById('selectedAuthorities-4_1').click(); return false;"> Agregar comentario <samp><b></b>Permite agregar comentario en el detalle.</samp> </a> </li> </ul> Well what I cant get work is when the checkbox is selected, on load, the JS should check it, and assign class="yes" to the li, here: <li id="selectedAuthorities-4_1li" class=""> Any suggestions? Thank you

    Read the article

  • use a sprite png in li-class and display in div

    - by bonny
    hello i have some problem with displaying a sprite in a div that is in a li-class. so the structure is: <li id="aa"> <div><a href="#">one</a></div> </li> and the css: li{ width: 120px; height: 18px; margin-top: 5px; } li div{ width: 20px; height: 10px; background-image:url(../images/sprite.png) background-repeat: no-repeat; margin-left: 0px; font-weight:bolder; border: 1px solid #fff; } when i use this i can see the sprite even outside the div. so i tried adding to li background-image: none; that makes the image in the div not visible too. so if there is someone who know about that i really would appreciate. thanks alot.

    Read the article

  • jQuery gallery turn over with next and previous buttons

    - by Ralf
    Hi, i'm trying to do some kind of Gallery-Turn Over Script with jQuery. Therefor i got an array with - let's say 13 - images: galleryImages = new Array( 'images/tb_01.jpg', 'images/tb_02.jpg', 'images/tb_03.jpg', 'images/tb_04.jpg', 'images/tb_05.jpg', 'images/tb_06.jpg', 'images/tb_07.jpg', 'images/tb_08.jpg', 'images/tb_09.jpg', 'images/tb_10.jpg', 'images/tb_11.jpg', 'images/tb_12.jpg', 'images/tb_13.jpg' ); My gallery looks like a grid showing only 9 images at once. My current script already counts the number of li-elements in #gallery, loads the first 9 images and displays them. The HTML looks like this: <ul id="gallery"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> <ul id="gallery-controls"> <li id="gallery-prev"><a href="#">Previous</a></li> <li id="gallery-next"><a href="#">Next</a></li> </ul> I'm pretty new to jQuery an my problem is that i can't figure out how to split the array in portions with 9 elements to attach it as a link on the control buttons. I need something like this: $('#gallery-next').click(function(){ $('ul#gallery li').children().remove(); $('ul#gallery li').each(function(index,el){ var img = new Image(); $(img).load(function () { $(this).css('display','none'); $(el).append(this); $(this).fadeIn(); }).attr('src', galleryImages[index]); //index for the next 9 images?!?! }); }); Thanks for help!

    Read the article

  • problem with jquery sortable of ul with childrens - how to allow li to be sorted only on the same le

    - by Y.G.J
    $(document).ready(function() { $("#test-list").sortable({ items: "> li", handle : '.handle', axis: 'y', opacity: 0.6, update : function () { var order = $('#test-list').sortable('serialize'); $("#info").load("process-sortable.asp?"+order+"&id=catid&order=orderid&table=tblCats"); } }); $("#test-sub").sortable({ containment: "ul", items: "li", handle : '.handle2', axis: 'y', opacity: 0.6, update : function () { var order = $('ul').sortable('serialize'); $("#info").load("process-sortable.asp?"+order+"&id=catid&order=orderid&table=tblCats"); } }); }); <ul id="test-list"> <li id="listItem_10">first<img align="middle" src="Themes/arrow.png" class="handle" /></li> <li id="listItem_8">second<img align="middle" src="Themes/arrow.png" class="handle" /> <ul id="test-sub"> <li id="listItem_4><img align="middle" src="Themes/arrow.png" class="handle2" /></li> <li id="listItem_3"><img align="middle" src="Themes/arrow.png" class="handle2" /></li> <ul id="test-sub"> <li id="listItem_9"><img align="middle" src="Themes/arrow.png" class="handle2" /></li> </ul> </li> </ul> </li> </ul> the problems i have: sorting the main ul is working but not all the time - i will try to fix that my own but if there is a problem with the code here and not the one in proccess-sortable - tell me. moving li in the main ul is ok but the sub or the sub of the sub is having problem - i can drag something from one sub to it's sub or the other way too - i don't want that to happend. i want to be able to drag li and by selecting that one that only this ul group will send to proccess-sortable to be updated - how can i catch the specific ul of li i am draging?

    Read the article

  • jquery masonry on ul with nested ul

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

    Read the article

  • Show/hide jQuery

    - by Banderdash
    Not much experience with JavaScript, hopefully one of you gurus can help. <div id="themes"> <h2>Research Themes</h2> <ul> <li><a href="">Learn about our approach to the <strong>environment</strong></a><span><a href="#">Expand</a></span></li> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> <li><a href="">Learn about our approach to <strong>human health</strong></a><span><a href="#">Expand</a></span></li> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> <li class="last"><a href="">Learn about our approach to <strong>national defense</strong></a><span><a href="#">Expand</a></span></li> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> </ul> </div><!-- // end themes --> This is my markup. As you can see under each of the first tier of li's there are ul's with classes of tier_2 and hide. I've been trying to create some simple jQuery that on click will remove the hide class from it's child ul, but at the same time check that no other ul's with class of tier_2 are shown (aka the other's have the hide class). This should keep a visitor from expanding so many items at once that it will make the layout look funky. Just not sure how to accomplish this, any ideas?

    Read the article

  • How do I filter out NaN FLOAT values in Teradata SQL?

    - by Paul Hooper
    With the Teradata database, it is possible to load values of NaN, -Inf, and +Inf into FLOAT columns through Java. Unfortunately, once those values get into the tables, they make life difficult when writing SQL that needs to filter them out. There is no IsNaN() function, nor can you "CAST ('NaN' as FLOAT)" and use an equality comparison. What I would like to do is, SELECT SUM(VAL**2) FROM DTM WHERE NOT ABS(VAL) > 1e+21 AND NOT VAL = CAST ('NaN' AS FLOAT) but that fails with error 2620, "The format or data contains a bad character.", specifically on the CAST. I've tried simply "... AND NOT VAL = 'NaN'", which also fails for a similar reason (3535, "A character string failed conversion to a numeric value."). I cannot seem to figure out how to represent NaN within the SQL statement. Even if I could represent NaN successfully in an SQL statement, I would be concerned that the comparison would fail. According to the IEEE 754 spec, NaN = NaN should evaluate to false. What I really seem to need is an IsNaN() function. Yet that function does not seem to exist.

    Read the article

  • Simple show/hide jQuery troubles

    - by Banderdash
    Okay, I feel like a bit of a 800 pound gorilla trying to thread a needle when it comes to jQuery. I need a script that will preform a simple show/hide (preferably with a nice sliding in and out) on a list. My markup looks like this: <div id="themes"> <h2>Research Themes</h2> <ul> <li class="tier_1"><a href="">Learn about our approach to the <strong>environment</strong></a> <ul class="tier_2 hide"> <li><a href=""><em>How we are tying this all together</em></a></li> <li><a href=""><strong>Project:</strong> Solor Powered Biofactories</a></li> <li><a href=""><strong>Project:</strong> Cleaning Water with Nature</a></li> <li><a href=""><strong>Project:</strong> Higher Efficiency Solar Technology</a></li> </ul> </li> <li class="tier_1"><a href="">Learn about our approach to <strong>human health</strong></a> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> </li> <li class="tier_1"><a href="">Learn about our approach to <strong>national defense</strong></a> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> </li> </ul> </div><!-- // end themes --> You can see that each nested ul has a class of "tier_2" and "hide". Ideally when the li they are nested within ("li.tier_1") is clicked it's child ul will have the hide class removed and the li's contained within will slideout, but at the same time should check all the other ul.tier_2's and be sure they get a hide class--so only one theme can be expanded at a time. I set up a sandbox to try some things: http://jsbin.com/odete/3 My JS looks like this: $(function(){ $(".tier_1 a").each(function(i,o){ $(this).click(function(e){ e.preventDefault(); $(this).addClass("show").siblings("ul").removeClass("show"); $("ul.tier_2:eq("+i+")").show().siblings("ul.tier_2").hide(); }); }); }); Totally a dumb way to do this, I am sure. But I based it off another script and it does work "a little bit" as you can see in the sandbox. If one of you mean hands at jQuery might be so inclined to take a peek I'd be very grateful. If you could also advise on how to have the transitions slideIn and Out that would also be fantastic!

    Read the article

  • CSS menu items flickering in IE6

    - by Quick Joe Smith
    Edit #1: I have just discovered this flicker bug affects IE8 (and therefore most likely IE7) as well. I am putting together a pure-CSS dropdown menu (mostly a learning exercise) and have hit a point in IE where the submenu items are flickering as the mouse moves around within the <li> but outside the inner <a>. Source code is as follows: The included csshover3.htc is downloadable from Peter Nederlof's page for Whatever:hover <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Menu</title> <style type="text/css"> body { behavior: url("csshover3.htc"); } div#navbar { background-color:#333; font-size:1.4em; overflow:auto; } div#navbar ul { display:inline-block; /* ie6 float container bug */ list-style:none; margin:0px; padding:0px; } div#navbar ul.menu li { float:left; display:inline; /* ie6 double-margin bug */ } div#navbar ul.menu a { display:block; text-decoration:none; color:#fff; padding:5px 10px; } div#navbar ul li a:link, div#navbar ul li a:visited { text-decoration:none; } div#navbar ul li a:hover { color:#333; background-color:#f6c323; } div#navbar ul.menu ul { display:none; } div#navbar ul.menu li:hover ul { display:block; position:absolute; background-color:#333; } div#navbar ul.menu li:hover ul li { float:none; } div#navbar ul.menu li:hover ul ul { display:none; } div#navbar ul.menu li:hover li:hover { position:relative; } div#navbar ul.menu li:hover li:hover ul { display:block; position:absolute; left:100%; top:0; } </style> </head> <body> <h1>CSS Menu</h1> <div id="navbar"> <ul class="menu"> <li><a href="#">A</a></li> <li> <a>B</a> <ul> <li><a href="#">123</a></li> <li><a href="#">2</a></li> <li> <a>Tweee</a> <ul> <li><a href="#">Phwoar</a></li> <li><a href="#">Gr</a></li> </ul> </li> </ul> </li> <li><a href="#">C</a></li> </ul> </div> </body> </html> Live demo: http://jsfiddle.net/4q6Vw/ Any help is appreciated.

    Read the article

  • Issue with CSS drop down

    - by user277314
    Im having a little issue with the css drop down in my navigation. The products nav tab is suppose to have the drop down. Additionally, the nav works fine but it seems that the sub categories arent displaying correctly. HERE IS LINK Here is my navigation code: HTML <div id="nav"> <ul id="navlist"> <li><a href="home.html" id="nav-home">Home</a></li> <li><a href="company.html" id="nav-company">company</a></li> <li><a href="benefits.html" id="nav-benefits">benefits</a></li> <li><div id="nav-products2">Products</div> <ul> <li><a href="food.html" id="nav-food-serv">Food Processing Services</a></li> <li><a href="vehicle.html" id="nav-vehicle-serv">Vehicle Services</a></li> <li><a href="auto.html" id="nav-auto-serv">Automotive Services</a></li> <li><a href="laundry.html" id="nav-laundry-serv">Automotive Services</a></li> </ul> </li> <li><a href="laboratories.html" id="nav-labs">laboratories</a></li> <li><a href="industries.html" id="nav-industries">industries</a></li> <li><a href="contact.html" id="nav-contact">contact</a></li> </ul> </div> CSS #nav { float:left; width:1002px; height:42px; } #navlist { list-style: none; list-style-position:outside; list-style-type: none; } #navlist li{ float:left; } #navlist li a { display: block; height: 42px; overflow: hidden; background-position: top left; background-repeat: no-repeat; text-indent: -999em; } #navlist li a:hover { background-position: bottom left; } #navlist li .current {background-position: bottom left;} /* NAV SPECIFICS */ #nav-home {width: 129px; background-image: url(../images/nav/home.jpg);} #nav-company {width: 161px; background-image: url(../images/nav/company.jpg);} #nav-benefits {width: 133px; background-image: url(../images/nav/benefits.jpg);} #nav-products {width: 112px; background-image: url(../images/nav/products.jpg);} #nav-labs {width: 137px; background-image: url(../images/nav/laboratories.jpg);} #nav-industries {width: 169px; background-image: url(../images/nav/industries.jpg);} #nav-contact {width: 161px; background-image: url(../images/nav/contact.jpg);} #nav-food-serv {width: 161px; background-image: url(../images/nav/sub.jpg);} #nav-vehicle-serv {width: 161px; background-image: url(../images/nav/sub.jpg);} #nav-auto-serv {width: 161px; background-image: url(../images/nav/nav/sub.jpg);} #nav-laundry-serv {width: 161px; background-image: url(../images/nav/sub.jpg);} #nav-products2 {width: 112px; background-image: url(../images /nav/products.jpg);height: 42px; overflow: hidden; background-position: top left; background-repeat: no-repeat;text-indent: -999em;} #nav-products2:hover {background-position: bottom left;} #navlist li ul { /* second-level lists */ position: absolute; z-index:10; list-style:none; display: block; background: #000; width: 161px; left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */ margin:0; padding:0; border-left:1px solid #a58545; border-right:1px solid #a58545; } #navlist li ul li { list-style:none; display: block; clear:left; width:100%; } #navlist li ul li a { display:block; overflow: hidden; height:42px; background-position: top left; background-repeat: no-repeat; text-indent: -999em; margin:0; background-color:0; padding:0; width: 161px; } #navlist li ul li a:hover { background-position: bottom left; }

    Read the article

  • Trying to get these list items to display inline

    - by Joel
    I have several unordered lists that I want to display like this: <ul> <li><img></li> <li><p></li> //inline </ul> //linebreak <ul> <li><img></li> <li><p></li> //inline </ul> ...etc I'm not able to get the li items to be inline with eachother. They are stacking vertically. I have stripped away most styling but still can't figure out what I'm doing wrong: html: <ul class="instrument"> <li class="imagebox"><img src="/images/matepe.jpg" width="247" height="228" alt="Matepe" /></li> <li class="textbox"><p>The matepe is a 24 key instrument that is played by the Kore-Kore people in North-Eastern Zimbabwe and Mozambique. It utilizes four fingers-each playing an individual melody. These melodies also interwieve to create resultant melodies that can be manipulated thru accenting different fingers. The matepe is used in Rattletree as the bridge from the physical world to the spirit world. The matepe is used in the Kore-Kore culture to summon the Mhondoro spirits which are thought to be able to communicate directly with Mwari (God) without the need of an intermediary.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/soprano_little.jpg" border="0" width="247" height="170" alt="Soprano" /></li> <li class="textbox"><p>The highest voice of the Rattletree Marimba orchestra is the Soprano marimba. The soprano is used to whip up the energy on the dancefloor and help people reach ecstatic state with it's high and clear singing voice. The range of these sopranos goes much lower than 'typical' Zimbabwean style sopranos. The sopranos play the range of the right hand of the matepe and go two notes higher and five notes lower. Rattletree uses two sopranos.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/bari_little.jpg" border="0" width="247" height="170" alt="Baritone" /></li> <li class="textbox"><p>The Baritone is the next lower voice in the orchestra. The bari is where the funk is. Generally bubbling over the Bass line, the baritone creates the syncopations and polyrhythms that messes with the 'minds' of the dancers and helps seperate the listener from the physical realm of thought. The range of the baritone covers the full range of the left hand side of the matepe.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/darren_littlebass.jpg" border="0" width="247" height="195" alt="Bass"/><strong>Bass Marimba</strong></li> <li class="textbox"><p>The towering Bass Marimba is the foundation of the Rattletree Marimba sound. Putting out frequencies as low as 22hZ, the bass creates the drive that gets the dancefloor moving. It is 5.5' tall, 9' long, and 4' deep. It is played by standing on a platform and struck with mallets that have lacross-ball size heads (they are actually made with rubber dog balls). The Bass marimba's range covers the lowest five notes of the matepe and goes another five notes lower.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/wayne_little.jpg" border="0" width="247" height="177" alt="Drums"/><strong>Drumset</strong></li> <li class="textbox"><p>All the intricate polyrhythms are held together tastefully with the drumset. The drums provides the consistancy and grounding that the dancers need to keep going all night. While the steady kick and high-hat provide that grounding function, the toms and snare and allowed to be another voice in the poylrhythmic texture-helping the dancers abandon the concept of a "one" within this cyclical music.</p></li> </ul> css: ul.instrument { text-align:left; display:inline; } ul.instrument li { list-style-type: none; } li.imagebox { } li.textbox { } li.textbox p{ width: 247px; }

    Read the article

  • Formatting jquery timeline?

    - by Beginner
    I am using a timeline plugin from here This is my current code: <ul id="dates"> <li><a href="#1940s">1940s</a></li> <li><a href="#1950s" class="selected">1950s</a></li> <li><a href="#1960s">1960s</a></li> <li><a href="#1970s">1970s</a></li> <li><a href="#1980s">1980s</a></li> <li><a href="#1990s">1990s</a></li> <li><a href="#2000s">2000s</a></li> </ul> <ul id="issues"> <li id="1940s"><img src="/gfx/timeline/1950.jpg" /> <h1>1940's</h1> <p>Ronald.</p> </li> <li id="1950s"><img src="/gfx/timeline/1960.jpg" /> <h1>1950's</h1> <p>Eddy.</p> </li> <li id="1960s"><img src="/gfx/timeline/1970.jpg" /> <h1>1960's</h1> <p>1960s</p> </li> <li id="1970s"><img src="/gfx/timeline/1980.jpg" /> <h1>1970's</h1> <p>1970s</p> </li> <li id="1980s"><img src="/gfx/timeline/1990.jpg" /> <h1>1980's</h1> <p>1980s</p> </li> <li id="1990s"><img src="/gfx/timeline/1990.jpg" /> <h1>1990's</h1> <p>1990s</p> </li> <li id="2000s"><img src="/gfx/timeline/2000.jpg" /> <h1>2000s</h1> <p>2000s</p> </li> </ul> But I don't understand how I can make it look like this... Any assistance?thanks Current CSS: #timeline { width: 660px; height: 350px; overflow: hidden; margin: 100px auto; position: relative; background: url('Img/vline.png') left 65px repeat-x; } #dates { width: 660px; height: 60px; overflow: hidden; } #dates li { list-style: none; float: left; width: 100px; height: 50px; font-size: 24px; text-align: center; background: url('Img/hline.png') center bottom no-repeat; } #dates a { line-height: 38px; text-decoration:none; color:#999; font-size:15px; font-weight:bold; } #dates .selected { font-size: 38px; color:#000; } #issues { width: 660px; height: 350px; overflow: hidden; } #issues li { width: 660px; height: 350px; list-style: none; float: left; } #issues li img { float: right; margin: 100px 30px 10px 50px; } #issues li h1 { color: #999; font-size: 20px; margin: 20px 0; } #issues li p { font-size: 14px; margin-right: 70px; font-weight: normal; line-height: 22px; }

    Read the article

  • jqGrid concatinating/building html tag incorrectly

    - by Energetic Pixels
    Please excuse to length of post. But I needed to explain what I am seeing. I have a onSelectRow option that is supposed to build stacked html <li> tags (such as <li>...</li> <li>...</li> <li>...</li> ) up to the number of static xml elements that I am looking at. But my script is concatinating all the image src links together instead of building the whole listobject tag. Everything else in my jqGrid script works with exception of repeated elements inside my xml. onSelectRow: function() { var gsr = $('#searchResults').jqGrid('getGridParam', 'selrow'); if (gsr) { var data = $('#searchResults').jqGrid('getRowData', gsr); $('#thumbs ul').html('<li><a class='thumb' href='' + data.piclocation + '' title='' + data.pictitle + ''><img src='" + data.picthumb + "' alt='" + data.pictitle + "' /></a><div class='caption'><div class='image-title'>" + data.pictitle + "</div></div></li>"); };" my xml file is something like this: <photo> <pic> <asset>weaponLib/stillMedia/slides/A106.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_A.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_A.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_B.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_B.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_C.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_C.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_D.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_D.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> My script works fine when it only sees one sequence, but when it sees more than one it puts all html inside the tags together then for the caption and title does the same for them. It generates only one <li></li> tag set instead of 5 in the example above like I want. The <li> tags are being used by a slideshow (with thumbnails) utility. Inside firebug, I can see the object that it is built for me: <a title="Side view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridge" href="weaponLib/stillMedia/slides/A106.jpgweaponLib/stillMedia/slides/A106_A.jpgweaponLib/stillMedia/slides/A106_B.jpgweaponLib/stillMedia/slides/A106_C.jpgweaponLib/stillMedia/slides/A106_D.jpg" class="thumb"><img alt="Side view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridge" src="weaponLib/stillMedia/thumbs/A106.jpgweaponLib/stillMedia/thumbs/A106_A.jpgweaponLib/stillMedia/thumbs/A106_B.jpgweaponLib/stillMedia/thumbs/A106_C.jpgweaponLib/stillMedia/thumbs/A106_D.jpg"></a> Within jqGrid, the cell is holding: <td title="weaponLib/stillMedia/slides/A106.jpgweaponLib/stillMedia/slides/A106_A.jpgweaponLib/stillMedia/slides/A106_B.jpgweaponLib/stillMedia/slides/A106_C.jpgweaponLib/stillMedia/slides/A106_D.jpg" style="text-align: center; display: none;" role="gridcell">weaponLib/stillMedia/slides/A106.jpgweaponLib/stillMedia/slides/A106_A.jpgweaponLib/stillMedia/slides/A106_B.jpgweaponLib/stillMedia/slides/A106_C.jpgweaponLib/stillMedia/slides/A106_D.jpg</td> I know that jqGrid is building it wrong. I am double-stumped as to direction to fix it. Any suggestions would be greatly greatly appreciated. tony

    Read the article

  • CLLocationDistance NaN

    - by Kaspa
    Hi, I'm trying to calculate a distance between two sets of coordinate points in an iPhone application on the fly using - (CLLocationDistance)getDistanceFrom:(const CLLocation *)location I saw that I started getting NaN's in strange places, thus investigated the matter up close, with the following hardcoded values. CLLocationDistance testDistance; placeLocation = [[CLLocation alloc] initWithLatitude:12.236533 longitude:11.011419]; userLocation = [[CLLocation alloc] initWithLatitude:12.236533 longitude:11.011419]; testDistance = [userLocation getDistanceFrom:placeLocation]; if(isnan(testDistance)) NSLog(@"ISNaN!"); [placeLocation release]; [userLocation release]; The above gets called multiple times, and in some situations the testDistance is NaN. I fear I'm missing something very simple here. Anyone have any idea? UPDATE 1: Ok, so I've moved the above code into a new project (put everything in the app delegate), looped it for 100 times and all is fine. This thus suggests that the problem is project related, but this helps very little... since all the variables are in the scope of 1 function. THE SOLUTION: OK, this seems to be a simulator bug. The same code build runs perfectly fine on the device. Case solved.

    Read the article

  • Filtering two arrays to avoid Inf/NaN values

    - by Gacek
    I have two arrays of doubles of the same size, containg X and Y values for some plots. I need to create some kind of protection against Inf/NaN values. I need to find all that pairs of values (X, Y) for which both, X and Y are not Inf nor NaN If I have one array, I can do it using lambdas: var filteredValues = someValues.Where(d=> !(double.IsNaN(d) || double.IsInfinity(d))).ToList(); Now, for two arrays I use following loop: List<double> filteredX=new List<double>(); List<double> filteredX=new List<double>(); for(int i=0;i<XValues.Count;i++) { if(!double.IsNan(XValues[i]) && !double.IsInfinity(XValues[i]) && !double.IsNan(YValues[i]) && !double.IsInfinity(YValues[i]) ) { filteredX.Add(XValues[i]); filteredY.Add(YValues[i]); } } Is there any way of filtering two arrays at the same time using LINQ/Lambdas, as it was done for single array?

    Read the article

  • Bug on submitted app binary but not in the simulator - CALayer position contains NaN

    - by Jonathan Thurft
    I submitted my app to the App Store where is ready to download. I've since then received some interesting crash reports when people select an image from the ImagePicker in one of my views. This bug (see below) makes the app crash. I was wondering 2 things. Can anyone spot the problem in the code below? How do you deal with bugs that are only in the App Binary but do not show up when trying to recreate them on the dev environment? - I can make the app crash with the Binary that is on the app store but when I do the same on the simulator or on my test phone the app works perfectly.. The Crash report in BugSense CALayer position contains NaN: [798 nan] Class: CALayerInvalidGeometry 0x00120e99 -[imageCroppingViewController imagePickerController:didFinishPickingMediaWithInfo:] (imageCroppingViewController.m:126) + 163481 The Code - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; imageView.image = image; CGRect rect; rect.size.width = image.size.width; rect.size.height = image.size.height; imageView.center = scrollView.center; [imageView setFrame:rect]; scrollView.contentSize = imageView.frame.size; self.navigationController.navigationBar.hidden = NO; [myPicker.view removeFromSuperview]; }

    Read the article

  • reformatting a matrix in matlab with nan values

    - by Kate
    This post follows a previous question regarding the restructuring of a matrix: re-formatting a matrix in matlab An additional problem I face is demonstrated by the following example: depth = [0:1:20]'; data = rand(1,length(depth))'; d = [depth,data]; d = [d;d(1:20,:);d]; Here I would like to alter this matrix so that each column represents a specific depth and each row represents time, so eventually I will have 3 rows (i.e. days) and 21 columns (i.e. measurement at each depth). However, we cannot reshape this because the number of measurements for a given day are not the same i.e. some are missing. This is known by: dd = sortrows(d,1); for i = 1:length(depth); e(i) = length(dd(dd(:,1)==depth(i),:)); end From 'e' we find that the number of depth is different for different days. How could I insert a nan into the matrix so that each day has the same depth values? I could find the unique depths first by: unique(d(:,1)) From this, if a depth (from unique) is missing for a given day I would like to insert the depth to the correct position and insert a nan into the respective location in the column of data. How can this be achieved?

    Read the article

  • Why are pieces of my HTML showing up on the page and breaking it? Is it PHP related?

    - by Jason Rhodes
    I've been building a site in PHP, HTML, CSS, and using a healthy dose of jQuery javascript. The site looks absolutely fine on my Mac browsers, but for some reason, when my client uses PC Safari, she's seeing strange bits of my HTML show up on the page. Here are some (small) screenshot examples: Figure 1: This one is just a closing </li> tag that should've been on the Media li element. Not much harm done, but strange. Figure 2: Here this was part of <div class='submenu'> and since the div tag didn't render properly, the entire contents of that div don't get styled correctly by CSS. Figure 3: This last example shows what should have been <a class='top current' href=... but for some reason half of the HTML tag stops being rendered and just gets printed out. So the rest of that list menu is completely broken. Here's the code from the header.php file itself. The main navigation section (seen in the screenshots) is further down, marked by a line of asterisks if you want to skip there. <?php // Setting up location variables if(isset($_GET['page'])) { $page = Page::find_by_slug($_GET['page']); } elseif(isset($_GET['post'])) { $page = Page::find_by_id(4); } else { $page = Page::find_by_id(1); } $post = isset($_GET['post']) ? Blogpost::find_by_slug($_GET['post']) : false; $front = $page->id == 1 ? true : false; $buildblog = $page->id == 4 ? true : false; $eventpage = $page->id == 42 ? true : false; // Setting up content edit variables $edit = isset($_GET['edit']) ? true : false; $preview = isset($_GET['preview']) ? true : false; // Finding page slug value $pageslug = $page->get_slug($loggedIn); ?> <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> <?php if(!$post) { if($page->id != 1) { echo $page->title." | "; } echo $database->site_name(); } elseif($post) { echo "BuildBlog | ".$post->title; } ?> </title> <link href="<?php echo SITE_URL; ?>/styles/style.css" media="all" rel="stylesheet" /> <?php include(SITE_ROOT."/scripts/myJS.php"); ?> </head> <body class=" <?php if($loggedIn) { echo "logged"; } else { echo "public"; } if($front) { echo " front"; } ?>"> <?php $previewslug = str_replace("&edit", "", $pageslug); ?> <?php if($edit) { echo "<form id='editPageForm' action='?page={$previewslug}&preview' method='post'>"; } ?> <?php if($edit && !$preview) : // Edit original ?> <div id="admin_meta_nav" class="admin_meta_nav"> <ul class="center nolist"> <li class="title">Edit</li> <li class="cancel"><a class="cancel" href="?page=<?php echo $pageslug; ?>&cancel">Cancel</a></li> <li class="save"><input style='position: relative; z-index: 500' class='save' type="submit" name="newpreview" value="Preview" /></li> <li class="publish"><input style='position: relative; z-index: 500' class='publish button' type="submit" name="publishPreview" value="Publish" /></li> </ul> </div> <?php elseif($preview && !$edit) : // Preview your edits ?> <div id="admin_meta_nav" class="admin_meta_nav"> <ul class="center nolist"> <li class="title">Preview</li> <li class="cancel"><a class="cancel" href="?page=<?php echo $pageslug; ?>&cancel">Cancel</a></li> <li class="save"><a class="newpreview" href="?page=<?php echo $pageslug; ?>&preview&edit">Continue Editing</a></li> <li class="publish"><a class="publish" href="?page=<?php echo $pageslug; ?>&publishLastPreview">Publish</a></li> </ul> </div> <?php elseif($preview && $edit) : // Return to preview and continue editing ?> <div id="admin_meta_nav" class="admin_meta_nav"> <ul class="center nolist"> <li class="title">Edit Again</li> <li class="cancel"><a class="cancel" href="?page=<?php echo $pageslug; ?>&cancel">Cancel</a></li> <li class="save"><input style='position: relative; z-index: 500' class='save button' type="submit" name="newpreview" value="Preview" /></li> <li class="publish"><input style='position: relative; z-index: 500' class='publish button' type="submit" name="publishPreview" value="Publish" /></li> </ul> </div> <?php else : ?> <div id="meta_nav" class="meta_nav"> <ul class="center nolist"> <li><a href="login.php?logout">Logout</a></li> <li><a href="<?php echo SITE_URL; ?>/admin">Admin</a></li> <li><a href="<?php if($front) { echo "admin/?admin=frontpage"; } elseif($event || $eventpage) { echo "admin/?admin=events"; } elseif($buildblog) { if($post) { echo "admin/editpost.php?post={$post->id}"; } else { echo "admin/?admin=blog"; } } else { echo "?page=".$pageslug."&edit"; } ?>">Edit Mode</a></li> <li><a href="<?php echo SITE_URL; ?>/?page=donate">Donate</a></li> <li><a href="<?php echo SITE_URL; ?>/?page=calendar">Calendar</a></li> </ul> <div class="clear"></div> </div> <?php endif; ?> <div id="public_meta_nav" class="public_meta_nav"> <div class="center"> <ul class="nolist"> <li><a href="<?php echo SITE_URL; ?>/?page=donate">Donate</a></li> <li><a href="<?php echo SITE_URL; ?>/?page=calendar">Calendar</a></li> </ul> <div class="clear"></div> </div> </div> * Main Navigation Section, as seen in screenshots above, starts here ** <div class="header"> <div class="center"> <a class="front_logo" href="<?php echo SITE_URL; ?>"><?php echo $database->site_name(); ?></a> <ul class="nolist main_nav"> <?php $tops = Page::get_top_pages(); $topcount = 1; foreach($tops as $top) { $current = $top->id == $topID ? true : false; $title = $top->title == "Front Page" ? "Home" : ucwords($top->title); $url = ($top->title == "Front Page" || !$top->get_slug($loggedIn)) ? SITE_URL : SITE_URL . "/?page=".$top->get_slug($loggedIn); if(isset($_GET['post']) && $top->id == 1) { $current = false; } if(isset($_GET['post']) && $top->id == 4) { $current = true; } echo "<li"; if($topcount > 3) { echo " class='right'"; } echo "><a class='top"; if($current) { echo " current"; } echo "' href='{$url}'>{$title}</a>"; if($children = Page::get_children($top->id)) { echo "<div class='submenu'>"; echo "<div class='corner-helper'></div>"; foreach($children as $child) { echo "<ul class='nolist level1"; if(!$subchildren = Page::get_children($child->id)) { echo " nochildren"; } echo "'>"; $title = ucwords($child->title); $url = !$child->get_slug($loggedIn) ? SITE_URL : SITE_URL . "/?page=".$child->get_slug($loggedIn); if($child->has_published() || $loggedIn) { echo "<li><a class='title' href='{$url}'>{$title}</a>"; if($subchildren = Page::get_children($child->id)) { echo "<ul class='nolist level2'>"; foreach($subchildren as $subchild) { if($subchild->has_published() || $loggedIn) { $title = ucwords($subchild->title); $url = !$subchild->get_slug($loggedIn) ? SITE_URL : SITE_URL . "/?page=".$subchild->get_slug($loggedIn); echo "<li><a href='{$url}'>{$title}</a>"; } } echo "</ul>"; } echo "</li>"; } echo "</ul>"; } echo "</div>"; } echo "</li>"; $topcount++; } ?> </ul> <div class="clear"></div> </div> </div> <div id="mediaLibraryPopup" class="mediaLibraryPopup"> <h3>Media Library</h3> <ul class="box nolist"></ul> <div class="clear"></div> <a href="#" class="cancel">Cancel</a> </div> <div class="main_content"> Does anyone have any idea why the PC Safari browser would be breaking things up like this? I'm assuming it's PHP related but I cannot figure out why it would do that.

    Read the article

  • Call C# code-behind method with a <li> onclick...

    - by Joris
    Hey'all I got a li - list, one with an onclick: <ul class="tabs"> <li><a href="#tab1">Foobar_1</a></li> <li onclick="doMethod"><a href="#tab2">Foobar_2</a></li> <li><a href="#tab3">Foobar_3</a></li> <li><a href="#tab4">Foobar_4</a></li> </ul> Now, the method I want to call when clicked on a tab (the li's), updates an UpdatePanel, so a gridview is shown. I know it must have something to do with AJAX, but I ain't got a clue how to move on now... so basically: how to call a c# method using AJAX?

    Read the article

  • unordered lists as columns

    - by Ben
    I am trying to use unordered lists as columns something setup like the following: <ul> <li>word 1</li> <li>word 1</li> <li>word 1</li> <li>word 1</li> <li>word 1</li> </ul> <ul> <li>word 2</li> <li>word 2</li> <li>word 2</li> <li>word 2</li> <li>word 2</li> </ul> What would I need to do as far as css these to lineup side by side as vertical lists with no bullets. I'm sure I'm missing something simple but I can't seem to figure it out. I specifically need this to work in IE7. Thanks in advance, Ben

    Read the article

  • jQuery Hover functions

    - by Banderdash
    Thus far you guys have been wildly helpful with me getting this little ditty working just so. I have one further request: This markup: <div id="themes"> <h2>Research Themes</h2> <ul> <li class="tier_1"><a class="enviro" href="">Learn about our approach to the <strong>environment</strong></a> <ul class="tier_2 hide"> <li><a href=""><em>How we are tying this all together</em></a></li> <li><a href="off.html"><strong>Project:</strong> Solor Powered Biofactories</a></li> <li><a href=""><strong>Project:</strong> Cleaning Water with Nature</a></li> <li><a href=""><strong>Project:</strong> Higher Efficiency Solar Technology</a></li> </ul> </li> <li class="tier_1"><a class="health" href="">Learn about our approach to <strong>human health</strong></a> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> </li> <li class="tier_1"><a class="defense" href="">Learn about our approach to <strong>national defense</strong></a> <ul class="tier_2 hide"> <li><a href="">Project name numero uno goes here</a></li> <li><a href="">Project name numero dos goes here</a></li> <li><a href="">Project name numero tres goes here</a></li> </ul> </li> </ul> </div><!-- // end themes --> And this jQuery: $(function(){ $(".tier_1 > a").hover(function() { var currentList = jQuery(this).parents('li').find('.tier_2'); $(currentList).slideToggle(); jQuery(this).parents('ul').find('.tier_2').not(currentList).slideUp(); return false; }); }); Create this nifty 'themes' slider you can see working on the right column of this page: http://clients.pixelbleed.net/biodesign/ I have two problems with it...The hover retracts the slideUp/down when you hit one of the links under a tier_2 ul. I'd like it to remain slideout as someone hovers the nested li's. So the slide should only happen on hover for the tier_1 elements. Also I would like, on hover to add an "active" class to the a element on the tier_1 links. So [a class="enviro"..] would, on hover, become [a class="enviro active"]. This is then removed when one of the other tier_1 items is hovered. This way the pretty color icon can stay visible while someone looks at the nested elements. Not even sure all that is possible with hover, but I figured if anyone would know a way it would be here.

    Read the article

  • JQUERY Prepending an LI to an UL with Animation

    - by nobosh
    Hello, I have a UL and I'm working to dynamically add a new LI to the top of the UL with some animation. I have the following so far which works ok: $("#container").prepend('<li id="newhere"><input type="checkbox" /><span class="listTitle">Im new here</span><ul></ul></li>').hide().slideDown("slow"); #container is the UL The problem with the above is that is hides the entire UL and then slides the entire UL down and I just want the NEW LI that was prepended to animate. Ideas? thxs

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >