Search Results

Search found 2953 results on 119 pages for 'charlene li'.

Page 46/119 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • jQuery Accordion: IE animation issues

    - by Nathan Long
    Update I am making this a community wiki, for three reasons: I don't feel like I got a definitive answer, but I have long since stopped needing an answer, because I rolled my own accordion function this question gets tons of views, so clearly lots of people are still interested So if anybody wants to change/clarify this question and make it a definitive guide, be my guest. I'm working on a page using jQuery's accordion UI element. I modeled my HTML on that example, except that inside the <li> elements, I have some unordered lists of links. Like this: $(document).ready(function() { $(".ui-accordion-container").accordion( {active: "a.default", alwaysOpen: true, autoHeight: false} ); }); <ul class="ui-accordion-container"> <li> <!-- Start accordion section --> <a href='#' class="accordion-label">A Group of Links</a> <ul class="linklist"> <li><a href="http://example.com">Example Link</a></li> <li><a href="http://example.com">Example Link</a></li> </ul> <!--and of course there's another group --> Problem: IE Animation stinks Although IE7 animates the documentation's example accordion menu just fine, it has problems with mine. Specifically, one accordion menu on the page moves jerkily and has flashes of content. I know that it's not a CSS issue because the same thing happens if I don't include my CSS files. The other accordion menu on the page opens the first section you click and, after that, won't open any of them. Both of these problems are IE-specific, and both go away if I use the option animated: false. But I'd like to keep the default slide animation, since it helps the user understand what the menu is doing. Is there another way?

    Read the article

  • jQuery code working in Safari and Chrome but not Firefox

    - by Chris Armstrong
    I'm got a site that has a long list of tweets, and as you scroll down the right column follows you down, showing stats on the tweets. (See it in action at http://www.grapevinegame.com . Click 'memorise', then 'skip' to get to the list page. Works in Safari and Chrome). I'm using jQuery to update the top-margin of the right column, increasing it as I scroll down. It seems to be working fine in webkit-based browsers, but doesn't budge in Firefox. Heres the code, the right column element is a div with id = "distance". // Listen for scroll function $(window).scroll(function () { // Calculating the position of the scrollbar var doc = $("body"), scrollPosition = $("body").scrollTop(), pageSize = $("body").height(), windowSize = $(window).height(), fullScroll = (pageSize) - windowSize; percentageScrolled = (scrollPosition / fullScroll); var entries = $("#whispers-list > li").length; // Set position of distance counter $('div#distance').css('margin-top', ($("#whispers-list").height()+$("#latest-whisper").height()+33)*percentageScrolled); // Update distance counter $('#distance-travelled').text(Math.round(distanceTravelled*(1-percentageScrolled))); $('#whispers-list li').each(function(index) { //highlight adjacent whispers if ($('#whispers-list li:nth-child('+(index+1)+')').offset().top >= $('#distance').offset().top && $('#whispers-list li:nth-child('+(index+1)+')').offset().top <= $('#distance').offset().top + $('#distance').height()) { // alert("yup"); $('#whispers-list li:nth-child('+(index+1)+') ul').fadeTo(1, 1); } else { $('#whispers-list li:nth-child('+(index+1)+') ul').fadeTo(1, 0.5); } }); }); Appreciate any help or advice!

    Read the article

  • bxSlider-4 text slide pass into the next slide

    - by Martialp
    I use http://bxslider.com/ to slide some content, just simple text. But it seem to have a problem with the text, not the image. I post a simple live exemple : http://jsfiddle.net/Sbt75/324/ As you can see on the exemple, we see the previous text from the previous slide on the left of the active slide. <div class="row"> <div class="large-6 columns"> <ul class="bxslider"> <li><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, obcaecati, laudantium, blanditiis, adipisci quod eaque porro sapiente eligendi dicta voluptates voluptatum sunt aperiam totam modi quis vitae maxime! Dolor, possimus.</p></li> <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, recusandae, delectus amet ipsa voluptate tempora architecto ad blanditiis officia perspiciatis nesciunt at ducimus quas nihil fuga. Qui optio minima accusamus?</li> <li><p class="right"> il etait une fois un grand mechant loupqui s'appelet jean et qui aimer courir dans l'herbe avec une grande harpe pour jouer dvant les enfants Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, recusandae, delectus amet ipsa voluptate tempora architecto ad blanditiis officia perspiciatis nesciunt at ducimus quas nihil fuga. Qui optio minima accusamus? </p> </li> </ul> </div> </div> $(document).ready(function(){ $('.bxslider').bxSlider({ auto: false, autoControls: false, nextSelector: '#slider-next', prevSelector: '#slider-prev', nextText: 'Onward ?', prevText: '? Go back' }); });

    Read the article

  • Form not sending full data

    - by gAMBOOKa
    I have a form with over 50 input fields. The input fields are divided into 5 jquery jabs within the form container. Here's a sample of what it looks like: <form action="admin/save" method="post" enctype="multipart/form-data"> <input type="hidden" name="type" value="department" /> <input type="hidden" name="id" value="21" /> <div id="tabs"> <ul> <li><a href="#tab-1">Tab 1</a><li> <li><a href="#tab-2">Tab 2</a><li> <li><a href="#tab-3">Tab 3</a><li> </ul> <div id="tab-1"> <label>Name</label> <input type="text" name="user-name" /> </div> <div id="tab-2"> <label>Address</label> <input type="text" name="user-address" /> </div> <div id="tab-3"> <label>Phone</label> <input type="text" name="user-phone" /> </div> </div> <input type="submit" value="Send" /> </form> I'm using PHP's Kohana framework, so admin maps to a controller, and save maps to the method action_save. When I output the $_POST variables in action_save, only 'type' and 'id' show up, all the other fields don't seem to submit their data. What could I be doing wrong?

    Read the article

  • jquery jumps to top on click event, return false or prevenDefault doesn't work

    - by Sebsemillia
    Hi, I have written a simple jquery script for a content slider. My problem is that the screen always jumps to the top position of the parent div when sliding the content. I've tried return false and preventDefault to cope with this effect, but the two just make the script not work anymore, nothing happens when I click the links.. So here is the jquery code: $(document).ready(function (){ var itemCount = $('.container div').size(); var itemWidth = $('.container div').width(); $('.container').wrap('<div id="AboutSlider"></div>'); $('#AboutSlider').css({'width':'640px', 'overflow':'hidden', 'position':'relative', 'height':'400px'}); $('#AboutSlider .container').css({'width':itemCount*itemWidth+'px', 'position':'absolute', 'height':'400px'}); $('.container .aboutContent').css({'padding-left':'0px'}); $('#AboutSlider .aboutContent').css({'width':'640px', 'float':'left', 'min-height':'400px'}); $('#AboutNav a').click(function(){ var integer = $(this).attr('rel'); $('#AboutSlider .container').animate({left:-640*(parseInt(integer)-1)}) $('#AboutNav a').each(function(){ $(this).removeClass('active'); if($(this).hasClass('button'+integer)){ $(this).addClass('active')} }); }); }); And here the respective html bit: <div id="Dienstleistungen"> <div class="left_column"> <h2>Meine Dienstleistungen</h2> <h3>KOMPETENZEN</h3> <ul id="AboutNav"> <li><h1><a href="#Kompetenzen" class="button1 active" rel="1" title="Frontend Entwicklung | Sebastian B&ouml;hme">&Uuml;berblick</a></h1></li> <li><h1><a href="#Frontend" class="button2" rel="2" title="Frontend Entwicklung | Sebastian B&ouml;hme">Frontend Entwicklung</a></h1></li> <li><h1><a href="#CMS" class="button3" rel="3" title="Content Management Systeme &amp; Online Shops | Sebastian B&ouml;hme">Content Management Systeme &amp; Online Shops</a></h1></li> <li><h1><a href="#SEO" class="button4" rel="4" title="Suchmaschinenoptimierung (SEO) | Sebastian B&ouml;hme">Suchmaschinenoptimierung (SEO)</a></h1></li> <li><h1><a href="#ScreenDesign" class="button5" rel="5" title="Screen Design | Sebastian B&ouml;hme">Screen Design</a></h1></li> <li><h1><a href="#Hand" class="button6" rel="6" title="Alles aus einer Hand | Sebastian B&ouml;hme">Alles aus einer Hand</a></h1></li> </ul> </div> <div class="container"> <div id="Kompetenzen" class="aboutContent right_columns"> <h1>&Uuml;berblick</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="Frontend" class="aboutContent right_column "> <h1>Frontend Entwicklung</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="CMS" class="aboutContent right_column "> <h1>Content Management Systeme &amp; Online Shops</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="SEO" class="aboutContent right_column "> <h1>Suchmaschinenoptimierung (SEO)</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="ScreenDesign" class="aboutContent right_column "> <h1>Screen Design</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="Hand" class="aboutContent right_column"> <h1>Alles aus einer Hand</h1> <p>Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> </div><!-- AboutSlider --> </div><!-- Dienstleistungen --> somebody got any idea? Thanks a lot in advance!!

    Read the article

  • Javascript API not working for Chrome or Safari on JW Player 5.9

    - by Lando
    I am working on a custom interface for the JW Player which displays the current track title and has play/pause, next track, previous track and volume toggle buttons. It works for IE8/9 and FF but fails for Chrome and Safari. Chrome's console gives the following error: Uncaught TypeError: Object # has no method 'addControllerListener' This is the code I am using for testing. <div id="container">Loading the player ...</div> <script type="text/javascript"> jwplayer("container").setup({ image: "preview.jpg", height: 320, width: 480, modes: [ { type: "html5" }, { type: "flash", src: "player.swf" } ], 'playlist': [ { 'file': "audio/01.mp3", 'title': "Track 1" }, { 'file': "audio/02.mp3", 'title': "Track 2" }, { 'file': "audio/03.mp3", 'title': "Track 3" } ], }); function playerReady(obj) { player = document.getElementById(obj.id); displayFirstItem(); }; function displayFirstItem() { try { playlist = player.getPlaylist(); } catch(e) { setTimeout("displayFirstItem()", 100); } player.addControllerListener('ITEM', 'itemMonitor'); itemMonitor({index:0}); }; function itemMonitor(obj) { $('#nowplaying').html('<span><strong>Now Playing:</strong> ' + playlist[obj.index]['title'] + '</span>'); }; </script> <div id="nowplaying"></div> <div class="control_bar"> <ul> <li onclick='player.sendEvent("play");'>[ &#8250; ] Play / Pause</li> <li onclick='player.sendEvent("prev");'>[ &laquo; ] Previous item</li> <li onclick='player.sendEvent("next");'>[ &raquo; ] Next item</li> </ul> </div> I have searched and tried several modifications, like adding the javascriptid parameter, nothing seems to work for Chrome or Safari. Any ideas? Thanks

    Read the article

  • Jquery: Display element relative to another

    - by namtax
    Hi I am trying to display a drop down list using jquery everytime a user clicks on a particular formfield... At the moment the HTML is as stands // Form field to enter the time an event starts <div> <label for="eventTime"> Event Time </label> <input type = "text" name="eventTime" id="eventTime" class="time"> </label> </div> // Form field to enter the time an event finishes <div> <label for="eventEnd"> Event Ends</label> <input type = "text" name="eventEnds" id="eventEnds" class="time"> </label> </div> And the Jquery looks like so // Display Time Picker $('.time').click(function(){ var thisTime = $(this); var timePicker = '<ul class="timePicker">' timePicker += '<li>10.00am</li>' timePicker += '<li>11.00am</li>' timePicker += '<li>12.00am</li>' timePicker += '</ul>' $('.timePicker').hide().insertAfter(thisTime); //show the menu directly over the placeholder var pos = thisTime.offset(); $(".timePicker").attr({ top: pos.top left: pos.left }); $(".timePicker").show(); }); However, when I click on one the form fields with class time, the timePicker drop down appears, but it always appears in the same location, not next to the form field as I would like. Any ideas? Thanks

    Read the article

  • XML Pretty Printer Missing 2 Key Edge Cases

    - by viatropos
    Using this xslt file found on this blog to pretty print xml using Nokogiri, everything almost works, but to the point where I can't use it for HTML. First, if a node is empty, it turns it into a self closing node, so: <textarea></textarea> gets converted to <textarea/> But that messes up the html tree when rendered. Second, if the node just has text, the text isn't tabbed, and the closing node isn't tabbed, so: <li> <label>some text</label> </li> becomes: <li> <label>some text </label> </li> ...but it would ideally be: <li> <label> some text </label> </li> Does anyone who's pro at XSLT know a quick fix for this?

    Read the article

  • jQuery tabs - multiple sets on on page

    - by Jonny Wood
    This is kind of a follow on from a previous question I posted but I've not been able to get it to work.. I'm trying to use multiple sets of tabs (jQuery) on one page. This is the code I had for one set of tabs which works great: $('div.tabs div.tab').hide(); $('div.tabs div:first').show(); $('div.tabs ul.htabs li:first a').addClass('current'); $('div.tabs ul.htabs li a').click(function(){ $('div.tabs ul.htabs li a').removeClass('current'); $(this).addClass('current'); var currentTab = $(this).attr('href'); $('div.tabs div.tab').hide(); $(currentTab).show(); return false; }); To use more than one set on the page I assigned #id's to each tab-set and tried to impliment this with: $.each(['#tabs-1', '#tabs-2', '#tabs-3' ], function(id) { $(id + 'div.tab').hide(); $(id + 'div:first').show(); $(id + 'ul.htabs li:first a').addClass('current'); $(id + 'ul.htabs li a').click(function(){ $(id + 'ul.htabs li a').removeClass('current'); $(this).addClass('current'); var currentTab = $(this).attr('href'); $(id + 'div.tab').hide(); $(currentTab).show(); return false; }); }); Obviously I'm doing something wrong here but as a jQuery newcomer I'm stumped!

    Read the article

  • jquery toggle on hover for multiple divs

    - by Oterox
    I have some divs with identical structure and i want to toggle when the mouse hovers the div so a hides and b shows: <ul class="tweets"> <li> <div class="a"> <p>show a</p> </div> <div class="b"> <p>show b</p> </div> </li> <li> <div class="a"> <p>show a</p> </div> <div class="b"> <p>show b</p> </div> </li> <li> <div class="a"> <p>show a</p> </div> <div class="b"> <p>show b</p> </div> </li> </ul> This is the jquery i'm using: $(document).ready(function(){ var tweet = $("ul.tweets .a"); tweet.hover(function(){ $('.a').toggle(); $('.b').toggle(); }); }); But this toggles ALL the divs and i only need to toggle one.I should use $(this) but i don't know how.How could i make this work? The fiddle is here

    Read the article

  • Is it bad use "display: table;" to organise a layout into 2 columns?

    - by Colen
    Hello, I am trying to make a 2 column layout, apparently the bane of CSS. I know you shouldn't use tables for layout, but I've settled on this CSS. Note the use of display: table etc. div.container { width: 600px; height: 300px; margin: auto; display: table; table-layout: fixed; } ul { white-space: nowrap; overflow: hidden; display: table-cell; width: 40%; } div.inner { display: table-cell; width: auto; } With this layout: <div class="container"> <ul> <li>First</li> <li>Second</li> <li>Third</li> </ul> <div class="inner"> <p>Hello world</p> </div> </div> This seems to work admirably. However, I can't help wondering - am I obeying the letter of the "don't use tables" rule, but not the spirit? I think it's ok, since there's no positioning markup in the HTML code, but I'm just not sure about the "right" way to do it. I can't use css float, because I want the columns to expand and contract with the available space. Please, stack overflow, help me resolve my existential sense of dread at these pseudo-tables.

    Read the article

  • Can i use microsoft ajax tab controls SKIN only ?

    - by Anil Namde
    I like YUI's Tab, to use its look and feel for own tab like implementation we just have to include yui tabs CSS and use markups and css classes and done. example below, <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/tabview/assets/skins/sam/tabview.css" /> <ul class="yui-nav"> <li><a href="#tab1"><em>Tab One Label</em></a></li> <li class="selected"><a href="#tab2"><em>Tab Two Label</em></a></li> <li><a href="#tab3"><em>Tab Three Label</em></a></li> </ul> Now i have a site where Microsort's tab tab controls are used and there are some which are old simple tabs. Now i would like to change these old tabs to Microsoft tab structures just by using CSS if possible as we have done above for YUI. Is that possible to do that using CSS/file? How it can be done for Microsofts tab?

    Read the article

  • jQuery Hover Panes Flickering on child

    - by Dirge2000
    OK. Here's my basic HTML structure: <ul class="tabNavigation"> <li> <a href="#">Main Button</a> <div class="hoverTab"> <a href="#">Link Within Div</a> </div> </li> </ul> And here's my jQuery command: $('ul.tabNavigation li').mouseenter(function() { $('ul.tabNavigation div.hoverTab').hide(); $(this).children('div.hoverTab').stop(false, true).fadeIn('fast'); }); $('ul.tabNavigation li').mouseleave(function() { $('ul.tabNavigation div.hoverTab').hide(); $(this).children('div.hoverTab').stop(false, true).show().fadeOut('fast'); }); When you mouseenter/mouseleave the LI, the child div is supposed to appear/disappear, but the problem is the A tag within the hoverTab div causes the tab to flicker - as if, by rolling over the link, the mouse has left the LI... Any suggestions?

    Read the article

  • Please help clean this loop

    - by Alex Angelini
    I do not code much in Javascript, but I have the following snippet which IMHO looks horrendous and I have to do this nested iteration quite often in my code. Does anyone have a prettier/easier to read solution? function addBrowse(data) { var list = $('<ul></ul>') for(i = 0; i < data.list.length; i++) { var file = list.append('<li class="toLeft">' + data.list[i].name + '</li>') for(j = 0; j < data.list[i].children.length; j++) { var db = file.append('<li>' + data.list[i].children[j].name + '</li>') for(k = 0; k < data.list[i].children[j].children.length; k++) db.append('<li class="toRight">' + data.list[i].children[j].children[k].name + '</li>') } } $('#browse').append(list).show()} Here is a sample data element {"file":"","db":"","tbl":"","page":"browse","list":[ { "name":"/home/alex/GoSource/test1.txt", "children":[ { "name":"go", "children":[ { "name":"validation1", "children":[ ] } ] } ] }, { "name":"/home/alex/GoSource/test2.txt", "children":[ { "name":"go", "children":[ { "name":"validation2", "children":[ ] } ] } ] }, { "name":"/home/alex/GoSource/test3.txt", "children":[ { "name":"go", "children":[ { "name":"validation3", "children":[ ] } ] } ] }]} Thanks a lot

    Read the article

  • Preserve HTML font-size when iPhone orientation changes from portrait to landscape

    - by DShultz
    I have a mobile web application with an unordered list containing multiple listitems with a hyperlink inside of each li: <ul> <li id="home" class="active"> <a href="home.html">HOME</a></div> </li> <li id="home" class="active"> <a href="test.html">TEST</a></div> </li> </ul> ...My question is how can I format the hyperlinks so that they DON'T change size when viewed on an iPhone, and the accellerometer switches from portrait - landscape? Right now, I have the hyperlink font size spec'ed to 14px, but when switching to landscape, it blows way up to like 20px. I want the font-size to stay the same. Here is the selector: ul li a { font-size:14px; text-decoration: none; color: #cc9999; }

    Read the article

  • jQuery-UI How-to stop realoding the tabs

    - by user256034
    I'm using jQuery UI tabs functionality to load tab content via Ajax. But I need to load the tabs only once. At the first request. <div id="tabContainer"> <ul> <li><a href="/Home/Tab1">Tab1</a></li> <li><a href="/Home/Tab2">Tab2</a></li> <li><a href="/Home/Tab3">Tab3</a></li> </ul> </div> I hooked up the select event. I'm able to see if the content is already loaded or not.But I'm missng the point how to stop jQuery from sending the request. $("#tabs").tabs({ select: function(event, ui) { if (ui.panel.innerHTML != '') { //What to do here to stop jQuery from sending the request. return; } } });

    Read the article

  • Sticky/static variable references in for loops

    - by pthulin
    In this example I create three buttons 'one' 'two' 'three'. When clicked I want them to alert their number: <html> <head> <script type="application/javascript" src="jquery.js"></script> <script type="application/javascript"> $(document).ready(function() { var numbers = ['one', 'two', 'three']; for (i in numbers) { var nr = numbers[i]; var li = $('<li>' + nr + '</li>'); li.click(function() { var newVariable = String(nr); alert(i); // 2 alert(nr); // three alert(newVariable); // three alert(li.html()); // three }); $('ul').append(li); } }); </script> </head> <body> <ul> </ul> </body> </html> The problem is, when any of these are clicked, the last value of the loop's variables is used, i.e. alert box always says 'three'. In JavaScript, variables inside for-loops seem to be 'static' in the C language sense. Is there some way to create separate variables for each click function, i.e. not using the same reference? Thanks!

    Read the article

  • Find tag that contains certain text and add a class

    - by David Gard
    I have the following HTML, and I need to add a class to both <li> and <a> where the text 'Charts' exists (so not the second line, but rather the 4th and 5th). I cannot change the output of the HTML. <div class="wp-submenu-wrap"> <div class="wp-submenu-head">Charts</div> <ul> <li class="wp-first-item"> <a class="wp-first-item" tabindex="1" href="admin.php?page=charts">Charts</a> </li> <li> <a tabindex="1" href="admin.php?page=add-chart">Add Chart</a> </li> </ul> </div> I've tried doing this by locating the <a> tag that contains the text, but it is not working. Can somebody please point me in the correct direction? Thanks. Code that I've tried - $(document).ready(function(){ if(pagenow === 'admin_page_edit-chart') { var page = $('.wp-submenu-wrap a:contains["Charts"]'); page.addClass('current'); page.parent('li').addClass('current'); } });

    Read the article

  • Jquery Returning values to original

    - by Cam
    So my script works perfectly, but here is the issue, I have buttons (Sprite action here) that are 40px height, but the top 20 only shows perfectly. When you click the button ie img the bottom 20px show perfecto! but... Issue, i included in my script a way to return all others to there default (only one should be selected) now, how can I fix this issue that I seem unable to correct as I can select multiple of them ** USERS can switch ** The last part of the script that is the issue. Thanks $(document).ready(function() { $('.form_sub').hide(); $('.theader').addClass('active'); $('.theader_t').click(function() { $('.form_header').show(); $('.form_sub').hide(); $('.theader').addClass('active'); $('.sub_theader').removeClass('active'); }); $('.sub_theader_t').click(function() { $('.form_header').hide(); $('.form_sub').show(); $('.theader').removeClass('active'); $('.sub_theader').addClass('active'); }); $('.top_head_img').click(function() { $(this).css({ position: 'relative', bottom: '20px' }).siblings().css( 'bottom', '0' ); }); }); <ul class="top_head"> <li> <a href="javascript:void(0)" onClick="selectPic5('top');"><img src="custom/images/top2.jpg" alt="Left" border="0" class="top_head_img"/></a> </li> <li> <a href="javascript:void(0)" onClick="selectPic5('center');"><img src="custom/images/mid2.jpg" alt="Center" border="0" class="top_head_img"/></a> </li> <li> <a href="javascript:void(0)" onClick="selectPic5('bottom');"><img src="custom/images/bot2.jpg" alt="Right" border="0" class="top_head_img"/></a> </li> </ul>

    Read the article

  • css caption issue

    - by Moode Osman
    i have problem with caption to make caption appear under each photo when hover over it but thr problem here they appear all on one side one place the left bottom side here the code for HTML <div id="content2"> <ul style="width: 5020px; height: 600px;"> <li class="image" style="width: 392px;"><img src="images/pr1x.jpg" ><p class="caption">1st caption</p></li> <li class="image" style="width: 392px;"><img src="images/pr2x.jpg" ><p class="caption">2st caption</p></li> </ul></div> here the code for CSS li.image p.caption { position:absolute; display: none; font-size: 28px; color: red; } li.image:hover p.caption { display: list-item; }? #content2{ width: 150%; height: 600px; float:left; overflow:hidden; } #content2 p{ width: 150%; } .scrollbar-hor{ background-color: #e5e2de; height: 24px; width: 150%; float:left; } .handle-hor{ height: 25px; width: 400px; background: url(http://brafitting.info/images/bar.jpg) no-repeat; } plz help ty

    Read the article

  • What is the best unobtrusive and lightweight jquery solution to make tab?

    - by metal-gear-solid
    Which is the best unobtrusive and lightweight jquery solution to make tab? Although Jquery similar to jquery ui. jquery ui tab is good but it's overkill fro for just tab. we will have to add jquery ui core.js, jquery ui tab.js then a little code snippet. I need lightweight solution. using this type HTML. and jquery code should be in no.conflict mode. <ul> <li><a href="#example-1">example 1</a></li> <li><a href="#example-2">example 2</a></li> <li><a href="#example-3">example 3</a></li> </ul> <div id="tabs-1"> <p> tab 1 content</p> </div> <div id="tabs-2"> <p> tab 2 content</p> </div> <div id="tabs-3"> <p> tab 3 content</p> </div> tabs content should be accessible if js is disabled.

    Read the article

  • How to get multiple html() strings in jQuery

    - by Bryan
    I'm pretty new to jQuery... so far I'm impressed. But I encountered a situation today that is giving me trouble. I want to use .html() to get some raw text and use that in a selector, but that function only returns the first element. In the following structure, how can I get ALL of the "toggle_containerLG" divs to show when I click on the trigger "Some Header"? <h6 class="trigger active">Some Header</h6> <ul> <li><a href="#" class="trigger">Title One</a></li> <li><a href="#" class="trigger">Title Two</a></li> <li><a href="#" class="trigger">Title Three</a></li> </ul> <div class="toggle_containerLG" id='Title_One'></div> <!-- show these! --> <div class="toggle_containerLG" id='Title_Two'></div> <div class="toggle_containerLG" id='Title_Three'></div> <div class="toggle_containerLG" id='Title_Four'></div> <!-- not this one! --> I can't use $(".toggle_containerLG") because there are others I don't want to expand... I just want the ones listed under "Some Header". Seems like there should be an easy way to do it... and I'm just missing it because I don't know jQuery very well.

    Read the article

  • Selecting a div with same ID as the rel attribute of clicked link

    - by Chris
    Hi there, This is a two-part question. I'm using jQuery for a project and wanting to click a link and toggle the class name "highlight" to that link and also to the div with the same id as the rel attribute of the link. I then want to be able to link to the next div without the classname of "highlight". Here's the HTML for it: <ul> <li><a href="#" rel="panel1">Item 1</a></li> <li><a href="#" rel="panel2">Item 2</a></li> <li><a href="#" rel="panel3">Item 3</a></li> </ul> <a href="">go to next div without class of highlight</a> <div id="panel1">some text</div> <div id="panel2">some text</div> <div id="panel3">some text</div> Can anyone help with jQuery side of things? Many thanks in advance!

    Read the article

  • set/clear interval issue

    - by 3gwebtrain
    HI, i am using the following code to show a link which is inside the li element. the constrain is, once the mouse enter into li element, and if it's stay inside 3sec, then it need to show. once i leave from li element, immateriality it should hide. for this, i am using : var showTimeOut; var thisElement $('.user-list li').live('mouseover',function(){ thisElement = $(this).children('a.copier-link'); showTimeOut = setInterval(function(){ thisElement.css({'display':'block'}); },3000); }) $('.user-list li').live('mouseleave',function(){ clearInterval(showTimeOut); thisElement.hide(); }) It's work fine. But the problem is, while i cross the li element with just a second, even the interval is calling, and showing the link. but i need to show only, if i stay inside 3sec and it need to hide there after, again i stay back 3sec. anything wrong with my code?, else any one give me the best suggestion? Thanks.

    Read the article

  • Why IE7 is not respecting the z-index order?

    - by janoChen
    The #cm_sidebarDIV div has z-index 3; The .abouttop and .aboutlist divs have z-index 2 So #cm_sidebarDiv is at the top when it is displayed in Firefox and Chrome but in EI7 it remains at the bottom. #leftmanulist{ background:url("images/abouttop.gif") no-repeat; float: left; margin: 2px 2px 5px 30px; padding:39px 0 0 0; width:237px; } #leftmanulist ul li{line-height:35px;text-align:left; text-decoration:none;} #leftmanulist ul li a{ text-decoration:none;} #leftmanulist ul li:hover{ color:#0068FF;} #leftmanulist ul li a:hover{ color:#0068FF;} #leftmanulist ul li.index{ color:#0068FF;} #leftmanulist ul li.index a{ color:#0068FF;} .abouttop{background:url("images/leftmanulist_z.gif") repeat-y ; padding:0 6px; position:relative; z-index:2; width:237px;} .aboutlist{position:relative;left:28px;} .aboutbutton{background:url("images/leftmanulist_b.gif") no-repeat; width:237px; height:20px; position:relative; top:-17px; z-index:2;} .inword{color:#555555;font-size:0.92em;text-align:justify;line-height:24px;letter-spacing:1px; padding:30px 40px 0px 336px; } #cm_sidebarDIV { z-index: 3; } Any suggestions?

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >