Slider Text Box
I am using a slider with a range. Everything works correctly except that when I type into the textboxes the number I type gets repeated several times. So for example, if the default text is $842, and I type in a '3' to make it $8432 the value jumps to $8,433,333,333. or something like that. I do format the price like this: $('#Slider').prev('.SliderDetails').children('.val1').priceFormat({ prefix: '$', thousandsSeparator: ',', centsSeparator: '', centsLimit:
Clickable Dropdown Navigation [PROBLEM]
I 'm working on a menu which imitates a desktop application menu toolbar (like this on your firefox ). Here's a demo http://jsfiddle.net/bvRnR/11/ [1] The menu is an <ul> containing <li> elements and <ul>s for sub-navigation. [2] User clicks the top-nav <li> with the arrow indicator and sub-menu pops out. [3] By clicking again the sub-menu hides. [4] Also by clicking outside the top-nav <ul>, a visible sub-menu hides (i used focusout event for this one). [5] Last one, a usability enhancement. Once
attaching JS function to a UL/LI menu item
Ok. Extreme newbie here. I have a menu system that is structured in <ul>/<li> fashion. Code below. How do I attach JS functions to any single item? My functions will be going out and grabbing the static xml and applying some filtering/selections on it, then passing the result to a datagrid. Writing the function is not hard (standard JS), but how do I attach it to a <li> type of menu item?? Each high-level menu item (such as Small Arms, Bombs) will be performing selections on completely separate
load new page and set img src with .click
I'm very new to jQuery and have run into a problem. I've successfully put together a script that will load images in a different div with fadeIn and fadeOut. Thumbnails are clicked on, and then the full size image will load. This content is all contained on a Gallery page. The problem is that I have a separate page section, appearing on all pages of the site, that holds thumbnails of recent gallery uploads. When these are clicked, I want to load the Gallery page, and set the source of the full scale
Load external html file after 10sec in a div
Hello, how is it possible to use the load function after 10sec to load a external file ? I googled for the delay(10000) option but be not able to include it into my script: $(document).ready(function(){ $("div#menu").load("flashmenulinks.html"); }); Thanks for help Christian
One Interferring with another!
I have two different jquery funcation on my website and the both work by themselfs but for some reason that I can't figure out they don't work on the same page. Could someone please look at my website and tell me what my problem it? There menu in using jquery and the "find a driver" button in the top right hand site. The menu drops while hovering above it and the "find a driver" drops down when you click on the orange up and down arrows! Thanks, Adam My Website
If string contains string
Hi all, I have been trying for approximately 3 hours now on the same small problem. I have a form with an amount of input fields. Each input field has a class "personalForm2" I want to check over all fields with class of personalForm2 to see if the value someone enters in is a "<" or a ">" or "script". Basically to validate those fields to make sure someone isn't trying to do the dirty on me. Is there something along the lines of: $('table .personalForm2').each( function(){ if ($(this).contains("<"
keyup problem with 1.4?
Hi everyone, I have a page set to move forward and backwards through the months of a calendar when the user presses the forward or back arrow keys. I had this code working fine in 1.3.2, but have been testing with 1.4.2 and now it seems that the keys are being fired over and over again. Is there a problem with my code? Something I need to update to work with 1.4.2? Or is this a 1.4.2 bug? Here's my "keyup" code (which is inside doc ready): $(document.documentElement).keyup(function (event) { if
Trying to create an image loader but the image wont load. I know my code is right, any help please. comments are in place
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Image Loading</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="/js/jquery-1.4.2.js" type="text/javascript"></script> <style type="text/css"> body { margin: 10px; background: #ddd; } DIV#loader { border: 1px solid #ccc; width: 500px; height: 500px; } /** * While we're having the loading class set. * Removig it, will remove the loading message
slide() problem
hi, this code $("div").click(function () { $(this).hide("slide", { direction: "down" }, 1000); }); from here, http://docs.jquery.com/UI/Effects/Slide is giving me following error (in both 1.3 & 1.4): jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")] is not a function this.pos = jQuery.easing[this.optio...ate, n, 0, 1, this.options.duration); I need an alternative to animate fn, b/c what I need to do is slide from one img to another (this is for a link; when user mouses
.live, .tabs and hjacking forms removes submit button from post data
I am not sure if this is a bug or a behavior or my code causing the problem. Because of limitations with tabs in the UI the following bit of code essentially hijacks the forms submit button and dynamically serializes and submits data while ensuring the response goes to the correct or active tab. $j('.auth-form').live('submit', function() { $j('.ui-tabs-panel:visible').html(loading); $j.ajax({ data: $j(this).serialize(), type: $j(this).attr('method'), url: $j(this).attr('action'),
Binding Server data to control for event handler parameters
I'm wondering what the best way to go about binding data from the server to an html element would be so that I can pass in data to an event handler. The two methods I've observed thus far are using the data() function from jQuery, but I'm mostly returning HTML data in my ajax requests and so I'm not sure how I could gracefully pass the parameters back in the response. The other option I've seen is using custom attritubes within the html tag, but that doesn't appear to validate with W3C. I'm binding
Dynamic data parameter load method
I use the load method to load some data into a div. I need to pass some parameters however the parameters passed can vary. To do that I tried to use an array like this where I populate load_params as needed. load_params = new Array(); load_params['type'] = type; $('#comments_container').load(base_system_url + "&show=ajax_details", load_params); But it doesn't seem to work. Can anyone help?
Accent problem when filling a text field!
Hey, what's up everybody! I'm having a little problem in my system and I would appreciate your help: I have an input field in my form and when I fill it from an external .js(file) with an encoded accent, it doesn't "change" the encoded accent to it's real accent. For Example: (in my html file) <input type="text" id="test"> (in my external js file) $(document).ready(function(){ $("#test").val("writing an accent like this: ç ã á"); }); When i check the html file, it appears exactly
Help with custom animation
Hey all, I am pretty new to all of this jQuery business but I was hoping someone might be able to help me with an animation I am trying to pull off. Basically what I need to happen is this: when a div is clicked another div first animates downward a set distance. After that distance is reached it animates to the right another set distance. I am having problems figuring out how to script this. My example would be something like this: When div#image is clicked, div#box moves down 50px. Then, once div#box
.Change only by mouse click?
Hi all, First time posting, been using JQuery about a year, though! Anyhoo...I'm having a bit of trouble with change events on a select box. If the selection is made via mouse, I can show/hide the associated fieldset just fine, but if the select box selection is made via keyboard or selectedIndex is changed via other code, it doesn't work. I've searched around, but I'm not finding info on this. Can anyone shed some light for me?
Code doesn't execute in normal stage, but it does with breakpoints.
Hi, I have the following code: $(".editproduct").click(function(){ id = this.id; $("#content_new").dialog('open'); }); When i click on an element with the class 'editproduct' nothing happens. But when i put in breakpoints in Firebug on the lines above everything works like a charm. Is jQuery trying to do things faster then I want? I thought the ID didn't got set but that's no problem, because when there is no ID set it should open anyway.
how to select ".classA .classB", but not ".classA .classA .classB"
I'm trying to implement (class-based and nestable) collapsible content with jQuery. Starting from a specific "div.wrapper" to which I have stored a reference in $wrapper, I need to select all descendants of the type "div.collapsible", but exclude those which are also descendants of lower-down "div.wrapper" elements (that is: "div.wrapper" elements which are themselves descendants of the original "div.wrapper" pointed to by $wrapper). I've tried the following, neither of which works: $wrapper.find('.collapsible:not(.wrapper
[Validate] certain fields with a function in a multipart form
I have a simplified version below of a multipart form. There are two steps and two tabs. I want the user to enter their username and email address and click 'Next' which will validate to make sure those fields are filled in, then activate and advance to tab #2 (Step #2) of the form, where they enter their credit card information. I am having difficulty because username, email and credit card are all in the same form and I need to only validate certain fields on each step of the form. I was thinking
Matching all anchor tags with "http://" in the href attribute
This is probably an easy one for you vets, as it's doing a basic match then add a class, but I'm just learning jQuery AND trying to figure out regular expressions, too. The subject of this post says it all: I want to be able to match all <a> tags on a Web page that are external links, which would be signified by the href attribute starting with "http://", obviously. Then I want to add an attribute to the matching tags. I ran across this script that is supposed to do that: <script type="text/javascript">
ajax replaces inputs in form, then they don't get passed through post
Ok, so I have just recently started using ajax and I love it but I am having some issues with mixing ajax and good old fashioned submitting of forms. I have a page that has a form on it containing a bunch of different inputs. Some of these inputs depend on others so I set them up with .change for a select and .click for a button to refresh some date information. I am using Code Igniter so I send the ajax to a controller that returns a view which is essentially just a section of my page. If I use
Is there a good javascript and jQuery book that isn't packed with the less needed javascript?
While I'm learning jQuery, I've realized that some things are still simpler (or possible) in plain javascript. The problem is, the javascript books I peruse go through all this gunk you seldom need with jQuery - like browser detection and adjustments. OTOH, the jQuery books usually scant javascript. Is there a book that teaches javascript along with jQuery, but only the javascript it makes sense to learn, at least at first? In areas where jQuery is much superior, it should skip the corresponding
[jQuery] .ajax problem
ive been doing a bit of testing with .ajax and am having problems. <span onClick='$("p.testing123").html("Some text and bold!"); $("p.testing234").append("Some text and bold!"); $.post( "_ajax.php",{testing:"2"}, function(xml) { $("p.testing456").html($("outputt",xml).text()); $("p.testing678").html($("testing",xml).text()); } ) ' > click here </span> | <span onClick='$.ajax({url: "_ajax.php", type: "POST", data: "testing:1", complete:"", success: function(xml) { $("p.testing456").html($("outputt",xml).text());
Change selectboxes. Working jQuery code, but a bit cluttered...
Hi Everyone, I'm changing the time by 1 hour in the second selectbox, based on what's selected in the first selectbox. The code is working perfectly fine, you can paste it in your texteditor and fire it up in your webbrowser to see how it works. The code is just a bit cluttered. So any (better) suggestions are welcome... <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <select id="mySelect"> <option value="8">08:00</option> <option value="9">09:00</option>
How to save the modify?
Hello! I have this code: $(svg).find("title").each(function() { if ($(this).text() == current_layer_name) { $(this).next().attr("fill", "#00ff00"); } });The question is: how to save the modify into $(svg) ? This returns the list of tags <title>. The svg variable is a xml string. Excuse my english, andrea
.html(), .before() and .after() not working were .text() does...
The .html(), .before() and .after() methods aren't working for me but strangly if I replace .html() with .text() and leave everything else the same then that part works. What's also strange is that sometimes it .html() etc work and other times they don't... I have the following code in a linked js file: function getMatch (id, template) { db.transaction( function (transaction) { transaction.executeSql( "SELECT * FROM matches WHERE (id = ?) LIMIT 1", [id], function (transaction, result) { var row =
jquery-ajax problem
hi i m implement webmail lyk newer yahoo mail. i have panel in which i fetch mailboxes from database.if i click on (inbox) mailbox i got inbox mail in table view.if i click multiple times on mailboxes and then after i drop mail ajax call mailtiple times... 1)here code is get mail boxes(asp.net) <% Dim cn1 As NpgsqlConnection cn1 = New NpgsqlConnection(ConfigurationManager.AppSettings("CN")) cn1.Open()
$.get - embedding script in html fragment - how to execute AFTER dom updated?
I am doing a $.get on a fragment of a page. The fragment contains some embedded script that will init the stuff on the page. Trouble is, as I am sure you know, the script executes before the callback handler i the get call can insert the data into the dom so nothing works. Only hit I found was this http://forum.jquery.com/topic/jquery-problems-with-embedded-scripts And I couldn't understand exactly what the solution was (ie how to code it). All I got were syntax errors or it just did not work, no
thread posting jquery function
Hi and this is my first post. I'm a seasonal PHP programmer but still new to jquery. I just started yesterday and my first application was odd/even selector, it works beautifully and I do seem to like jquery now. But now, I want to jump deeper to jquery functionality. I'm looking for a function or a plugin for thread posting. All I get is wrong result in search engines. It is something I do not how to do for many years and I need your help It work the same every time you post (just what like I'm
jquery client side validation ????
HI,PLZ How can I make the client side control fields with Struts 2 - jquery1.2 for the following jsp code: <s:form action="addSA" validate="true" theme="xhtml"> <s:textfield label="Name" onChangeTopics="textfieldUpdated" name="name" /> <s:submit value="addForm"/> </s:form> the function validate="true" doesn't give any effect so i want to replace it with the apropriate javascript validation code (used in jquery). Thanks for your help
Display only first few items of a list
Hello, I have a list similar to this: <ul> <li>Item 1</li> <li>Item 2</li> ... <li>Item 50</li> </ul> Is there some way I can use jquery to display only the first 10 items, for example, then below the tenth item display a link that says "Display All" and after clicking that link the rest of the list appears below the first 10 items? I know how to use the show and hide methods, but how do I write a function that only shows the first 10 items?
first loading content, than the toggl effect
using the code below it will load some content into a div and will display it with a nice toggle effect. when i click the gm button it will load a google maps into the extra div. when i hit the yt button it will load an youtube movie into the extra div. but when a google map is displayed, and a user clicks the yt button it has to toggle (hidden) the extra div first, then load the content, and in the end it has to toggle the div again. but now it's loading the content, toggle the div (hidden), and
Optimising image fade swap code
I have this code that currently swaps an image in the background of my site using two divs with a fade in effect. The code also vertically centers the image. This code works absolutely fine on a local server but as soon as its uploaded it becomes a little jerky and sometimes the vertical align 'misfires' and the top margin is far too big. function fadeBackground(image) { $('#wrapper_2 img').attr('src', image).load(function() {
<spaning> individual characters, not just elements - help
Hi guys, I'm trying to put <span>'s around individual characters. Here's what I have so far, but can't seem to tie it up properly. Alert testing each letter works fine; just can't seem to be able to use the wrap function at this stage..? Can anyone shed any light? <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function(){ var stringBody = $('body > *').text(); var stringBodyLength = $('body > *').text().length;
Action happening after window.location.replace
After a lot of messing around and guesswork, I have managed to get someone else's (can't remember who to give credit, sorry) slide toggle menu to work with 2 levels, I now have only one minor problem. I have a return false; statement after my window.location.replace but after the link is clicked, the first level slides up. I want the slider to not move after I have clicked a link. This might sound like a VERY minor problem but these things make the difference between a good site and a great site.
Show/hide 'Div' on textbox.value
hi i want to show/hide my div depent on my asp:texbox control.. cn you please provide me a code for it tanx in advance regards webster
Extracting text from PHP generated paragraph, populating modal form field
Hi everyone, I am trying to populate a modal form with information from a MySQL database, the text is inserted into a DIV with a PHP WHILE loop, like so: <?php while ($linkDetails = mysql_fetch_assoc($getLinks)) {?> <div class="linkBox ui-corner-all" id="linkID<?php echo $linkDetails['id'];?>"> <div class="linkHeader"><?php echo $linkDetails['title'];?></div> <div class="linkDescription"><p><?php echo $linkDetails['description'];?></p>
.toggle if class is not hidden AND "slow"
I'd like to .toggle a <div> if its not hidden, and do this "slow"ly ... the toggle works like this: $("#panel").toggle(false); but how can i add the "slow" ? Thanks in advance !
help with .animate()
hello there jquery gurus i have a problem with jquery animate()..can you please help me solve this one.. the problem is that when i delete a record the animation fade out effect wont work.. as i search for a solution it says that it should use color plugin.i already did that but it still not working.. here's my html code.. <?php foreach($result as $row): ?> <div id="myDiv"> <table class="record" width="513" border="0"> <tr> <td ><span class="style1">Check- in :</span></td> <td width="130"><?php
Inconsistency in getting size of an element under IE8 when Prototype is loaded
Prototype add a "scrollTo" function to elements, which make a test fail for jquery under IE8 standard mode In jquery-1.4.2.js, around line 6200, there's a function to get/set width or height of an element. It ends by this piece of code : return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window? // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[
Next Page