list don't get shown a second time
if i click on a <li>-Element, it's children should be displayed This works fine but if i click on the back button and let me display the same Elements again, the code fails (try 1 > back > 1 in the jsfiddle) here's a jsfiddle with code i created http://jsfiddle.net/m3A8g/2/ (i hope you see what i mean) i don't have a cule what i'm doing wrong here (perhaps there is even a more elegant way to deal with it than parent() and children()) thanks in advance, Fiisch0r
How to get the XML document part after using $.get()
Hi folks, Given the following standard jQuery code to .get() a (valid) .xml file: $.get(file) .success(function(data, textStatus, jqXHR) { oUIxml = $(data); }); Later on, I need the XML document part from the oUIxml jQuery object. Is there any way to achieve this without using something like .each() ? If I do: alert( oUIxml.text() );It'll get me all the text values from all nodes as one big chunk of text. But what I need is only the XML document, in fact just like: alert(
Most efficient way to search only some children of div?
Given this sample HTML: <div> <span class="searchme">some text</span> <span class="ignoreme">some more text</span> <span class="searchme">yet more text</span> <span class="ignoreme">finally some last text</span> </div> What is the most efficient way to determine if some search text is found within the div and ONLY in any one of the spans inside with a class of searchme? I can think of some convoluted ways but am hoping I've missed something fairly elegant and simple :) Right
Vote system
Hello. I have problems with vote system. I would write same vote system as on bash.org.pl. + and - are linked to controller 'vote', when i click on them, div called for e.g. 123_vote(where '123' is id of object) will refresh with new value loaded from database, and div 123_msg will refresh with message. I'm using codeigniter framework. Need help, sorry for my english.
drag and drop: draggable divs disappear
Hi, i am experimenting with the drag and drop feature but it wont work. Maybe someone can check it. i have a table <div id="content"><table> <tr><td><div id="id1" class="dragable" style="width:10px;height:10px;background:green"></div> Hello World</td></tr> <tr><td><div id="id3" class="dragable" style="width:10px;height:10px;background:green"></div> Hello World</td></tr> <tr><td><div id="id3" class="dragable" style="width:10px;height:10px;background:green"></div> Hello World</td></tr> </table></div>
Lost again - datepicker output format
Where is the date format changeable in a custom downloaded datepicker? I only find jquery.ui.datepicker.js in the development-bundle folder of the download. How can I change - simply, I am new - the date format to m/d/yy. More correctly -- where? Thanks.
Why is testing scroll not working?
I like to test on my browser all possibilities to scroll screen. I'm using jquery.scrollTo.js URL: http://demos.flesler.com/jquery/scrollTo/ I kindly ask you to check why scroll works only on TOP corner not working relative path...and other top links. Thanks.
SUBMIT buttons, value not passed to PHP by Firefox etc
I've inherited a website which uses jQuery to do AJAX submits. (The website owner and the original designer fell out). A piece of code which used to work under IE and FF (Chr, Opera, SAfari) now only works under IE. The failing code is given below. Looking at the PHP the code uses AJAX to submit a query. It looks as if this uses a jQuery hook to add a variable "requestType", although frankly the code is somewhat hard to follow. What happens is that under IE all variables are available to the
fadeIn & fadeOut not working in IE8 or lower
Hi all, I have a problem with my jquery. The next code works fine in IE9, FF and Chrome, but not in IE8 or lower. The problem is that my fade out and fade in on a block element are not working. The problem in action can be found here: http://www.paarsekever.nl/Showroommodellen.html and soem snippets of the code: HTML: <div id="linkgoleft">goleft</div> <div class="infoBlock block0" >data</div> <div class="infoBlock block1" >data</div> <div class="infoBlock block2" >data</div> <div id="linkgoright">goright</div>
How to pass params in JQmobile
Hello, I would like to ask: How to pass params in JQmobile? I have got html with params href="game.html?name=Ellisa&sound=1 and on page "game.html" i want to get this two variables: name and sound. I tried it to with: window.location.search.substr(1).split("&") but this cannot works. Thanks for any advice.
Jquery level problem
I have a problem with my jQuery accordion plugin. the control is always above everything in my page. i try to change z-index but it not solve it. this is the page: http://www.hfx.com/en-US/General FAQs If you try to press the top menu on: "Trading Tools -> World Interest Rates" you will find you can't do it, because the jQuery is above it. I can't find anything about it in the web. Someone? Adi
click event fires twice
I ran inro a problem recently which i haven't found any solution to. i generated a subnode for all unordered lists which are Childs of List-Elements like this: <ul> <li>1</li> <li>2 <ul> <li>2.1</li> <li>2.2</li> </ul> </li> <li>3</li> </ul> The generated list works fine and looks like this: 1 2 2.2 2.2 back <-Generated Element <li class="back">back</li> 3 but if I click the Back button the Event fires twice
jQuery 1.5: button() fails when id of input contains dots or square brackets
See fiddle http://jsfiddle.net/kiequoo/Efrzu/2/ The error generated is Uncaught Syntax error, unrecognized expression: [for=actualResponses[0].answer1] Which suggests the selector being generated to select the label should be [for="actualResponses[0].answer1"] If the id is changed to remove the dots and square brackets it works fine, see http://jsfiddle.net/kiequoo/Efrzu/3/
Pause a function midway
Hi can anyone help me to create a simple slideshow? Is there any way to pause a function that has more then one function inside of it (using callbacks).
Magic Line menu error
Hi guys I used a piece of code from a tutorial and edited it to get it working on my site, it works but for some reason it shows up differently on different browsers. On my home machine using IE8 it has the line below the text and the text at the top of the page, on my work machine also on IE8 it has the line above the text and the text in the middle of the menu bar. This is also how it displays in Firefox and Safari on my home machine as well. Very strange. I don't know enough about jQuery
is .queue() empty?
To what should .queue() be tested to ascertain if the queue is empty? null? empty string?
Starting jquery-1.4, in IE8, html() returns null for a non-HTML element (e.g. <xml)
In IE8, for the following HTML, $('#myXML').html() returns null starting jquery-1.4. This used to return the contents of the <xml> tag in jquery-1.3. Any ideas, how do I get the contents of <xml> tag? Thanks. <html> <head> <title>Title</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.js"></script> </head> <body> <xml id='myXML'> <node><value>some.value</value></node> </xml> <body> </html>
Understanding jQuery.get()
Hello. I am pretty new to jQuery and AJAX in general, and I am trying to figure out how exactly the jQuery.get() function works. I am writing a web application that pulls some html data from a php script, updates a div with that data, and updates that div's scrollbar (using the tinyscrollbar plugin) to "fit" the new contents. Here is my code: $(".menu").click(function(){ var oldContent = $("#dyn").html(); $.get("populate.php", {name: cleanMeUp($(this).html())}, function(data, statusMsg){ //gets page
Building a dynamic list, refesh not working - help please.
I am looking to learn how to add a dynamic list to my page without resorting to PHP. Currently I have a main page that links to sections in the page rather than individual pages that are loaded. The content I want to update has the container: <div content="dynamicList"> Themed list inserted here </div> I can populate the list fine already but the CSS is not applied and using the refresh() method, just goes to the first section in the page (firspage). e.g, <div id="firstpage"> link
Hide or remove based on content of different div onLoad?
I'm pretty new to jscript and jquery (long-time PHP programmer, though) and I'm stuck with how to properly evaluate a value in a document onLoad. Caveat - I am working on this via a CMS (BusinessObjects), so don't have 100% control over what's passed in to the page. HTML: <div id="home_alert"><hr /> <h2>MEMBER ALERT!</h2> <p><a href="/member-home.htm">LOG IN to read new items!</a></p> </div> <div id="member-alert-announce">{module_announcement,i,31801,true,,}</div> if {module_announcement,i,31801,true,,}
jSlide Related Pages
Hi guys, I've developed a new plugin which uses animation to show related pages on a website when you scroll down the page. The plugin works great in firefox but when I tested it in IE7 it seems to have a width issue. Any ideas?!?!? Official Plugin Page: http://plugins.jquery.com/project/jSlideRelatedPages You can see it in action here: http://www.jquery4u.com/plugins/jsliderelatedpages/ Thanks in advance Sam
How duplicate textbox value to another with button in asp.net
I have a registration form and I woud like to make a button what after pressed some textboxe's value copied into some others. I can program it in C# but I would like to use jQuery to I dont have to postback it to the server. <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Name 1"></asp:Label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br/> <asp:Label ID="Label2" runat="server" Text="Address 1"></asp:Label>
Mouse over on background image
Hello I was looking at Bing.ca and I was wondering If I can make the effect of mouse over on background image with using JQuery. Can we make this effect with JQuery? please let me know thank you Roshanak
Horizontal li resizble
Hi all, just wonding if im missing something here , i have a list with items i want to resize, if the list is vertical everything works fine, but when i add in the display:inline; to the li the drag markers appear but nothing happens and i cant make the items resize, all the cursers change its just not playing the game. Any help appreciated .dayStrip { padding:0; margin:0; color:#fff; font-family: arial, helvetica, sans-serif; list-style-type:none; width:700px; background:red; } .dayStrip li { display:inline;
How can I change the background image of each page in the booklet plugin?
Theoretically I think I understand it, but practically I must be doing something wrong in the syntax. I am still really new to JavaScript in general. I am assigning each of the (page) div's it's own id, I think I am getting that part right, and then I want to assign each of them a background image in the C.S.S.. But I am not sure how I should do this. does the statement start with a "." or "#", and should it go in or out of .b-loads {parameters?} .booklet .b-load {text-align:center; .cover {background-image
Draggable Droppable Reset
Hi, is there a way I can reset the ui once the draggable object has been dropped onto the droppable object? I have a draggable object (which has 'revert' to original position set) and a droppable object, Once I drag and drop the object onto the droppale area I can not reproduce the same effect when i drop the same object again. Im not sure if its the 'draggable' or 'droppable' object thats needs resetting? or if its the full ui? Hope ive explained correctly. Kind regards, paffley
Newbie to javascript, trying to learn..
I have been reading a lot about javascript and jquery and I have, in the past, successfully implimented plugins by copying, pasting, and then edited the prebuilt examples.. I am trying to learn a little more. I know the effect that I want, and have an idea of the logic behind it but I dont know enough of the syntax and the language to really get it. I have a little box of divs contained in "navBlock" div and the goal is to the change the color of all of the text inside of the "navBlock" div except
Formating list (li)
Hi Guys, Just started out on JQuery, now I have a simple problem. I am getting data via a php script and formatting them with "<li></li>" tags, but when populated the li wont format correctly. Here is a quick link so you can see what I am talking about. Demo what I want to know is how to have the right menu be like the left.
Remove object attribute
Hi guys/girls, I have an object created by: var obj = {}; obj.item1 = {}; obj.item2 = {}; obj.item3 = {}; obj.item4 = {}; I am wanting to remove one of the attributes. So I call $(obj).removeAttr('item1') This empties the attribute but the attribute still exists. Any pointers would be great! Here's the print out from chrome's js console obj Object item1: Object item2: Object item3: Object item4: Object __proto__: Object $(obj).removeAttr('item1') [ Object item1: "" item2: Object item3: Object item4: Object
Can you set an onclick event with jquery passing a variable as a parameter?
what i want to do- $("#temp").mouseover(bubble(i,i)); i is created from a for loop, and bubble is a fairly large function so not interested in redeclaring it just for this statement ive tried something like $("#temp").mouseover("bubble("+i+","+i+")"); but did not work, any ideas
pass a string from jQuery to php
In a tiered Autocomplete, I need to pass a string from the first selection into a php script to limit the search in the second tier Autocomplete. After much research, I can't get the string to the php. All files are in the same directory. Here's the jQuery: //set countryFilter for the 2nd tier to select stateProvince from only the country selected in the 1st tier countryFilter="countryAbbrev=" + $('input[name=country]:checked').val(); //eg. countryAbbrev=US $('stateProvince').autocomplete
jquery mobile - how to open the selece menu programatically
i'm new to jquery and jquery mobile. hope it's not a silly question. let's say I have a select menu inside a hidden div as below, <div id="divgender" style="display:none;"> <select id="gender" data-theme="b"> <option selected value="Man">Man</option> <option value="Woman">Woman</option> </select> </div> I also have a button in the same page somewhere. when the user click the button, i would like to make the divgender div visible, and open the select list automatically. is
Multiple var addition not updating properly
Hello. Sorry the code example might be a little long but it's repetitive and should be easy to understand. http://jsbin.com/eyeke4/13/edit My real code has 12 examples and not 3 but for the sake of this I had to shorten it as much as possible. When you go on there and preview it, you Select a level, then select a hero, then select 3 items and hit click me. This will give you a result of statistics. Now my problem is all the way on the right you will see all 3 values of AP are added together. In the
Does using delegate automatically unbind listeners when they are removed from the DOM?
I'm working on a photo gallery with pagination. As you go through pages, I'm removing and adding DOM elements. Using delegate would be great, but I don't know if the event listeners will be automatically removed when I destroy the dom nodes with listeners. I don't see anything in the documentation that says either way, and using undelegate everytime I change the dom kind of defeats the purpose of delegate. The reason for this question is this could be a huge memory leak if a user spent any amount
ajax
Hi, i have a simple question, i have started to use jquery in my website, and now i have a problem that i dont know how to resolve. from time to time i have to update the database where i have to insert in the database records about +-200 users where i create about 200k in total without db verifications, this operation takes 2hours, where i have to view what is the status for each user. Now im using popup's and when the script in the popup finish i use javascript to recall it with the next user,
Verizon Droid + JQM + Google Maps V3 API = FAIL
Please help if you know anything about getting a JQM map app working on the Verizon Droid. I am trying to get a geo-centric mobile web app working on multiple devices. I have read in these forums and elsewhere that many of you has had success with this. But when I try the examples listed below, none of them works with my Verizon Droid. The pattern seems to be the load happens and I get some of the Google elements, like the map/satellite button and the "Terms of Use", and even the directions polyline;
fallback text (for no-flash, no-html5 browsers) with j media element? [jme]
I've been getting the jme player up and running on a site this week, and I noticed that firefox with flashblock breaks it completely... the little "play" icon for flashblock never shows up, and since my files (mp3) can't be played back natively, the player just doesn't work with no explanation. I assume this is the same with safari/clicktoflash and ogg files, and non-html5 browsers without flash installed. In any case, is there an option to display fallback text if a user doesn't have html5 OR flash
Fancybox (Lightbox) - Last image not working.
Hi all I have this simple gallery that loads images from an xml file and uses Fancybox to display the images. Demo Everything is working but the last image is not working with fancybox. The last image just displays in it's own window. Can anyone see why the last image is not displaying with fancybox. <!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" xml:lang="en" lang="en"> <head> <meta
AJAX-Loading multiple elements by index
Hello I'm trying to load elements into a div via AJAX using the load() function. I have a bunch of div's with the same class in a remote file, and want to load the divs with the index of 3-6, (3,4,5,6). I am looking for a selector to get those elements, but can't find one suitable. At the moment my code looks as following: $('#main_wrap').load('portfolio.html .item:gt(2)');Are there a way to add a second selector lt(6) or in some other way get the result i seek?
Focus and Blur event on DIV element
Hi, I want to handle focus and blur events on any DIV element but don't know how? Any ideas? I tried this one: $('.myDIV').bind('focus',function(event){ // something }); but it doesn't work!
Next Page