[jQuery] [validate] spinner - loading
Hi! Thanks for all your help with validate plugin, my last questions ara about: #1 The way of showing a spinner or loading gif while the remote validation is asking for data? #2 (remote ajax call to know if user exist)The remote ajax call is executed each time a wrote a character, can i do something to call the remote validation only when the user is out of the input or when the user click some kind of button next to the input field to check if user exist? Here is the code that im actually using:
[jQuery] loading content from a remote file and appending it into DOM element
Hi, I would like to load content from "process_data.php?id=2" and then append that data into the DIV with id="dataDiv", how would I do this? I have seen the ".load" directive, but seems to erase any data previously in the DOM element whereas I want to append on to what is already there. Thanks for any help, - Dave
[jQuery] jQuery Image Swap Works in FF, not IE
Hi all, I have a little jQuery function that toggles a window on click and changes the background image of a span (to toggle an up/down arrow). It works fine in FF, but in IE, it is delayed. For example, in IE, you click once and the arrow stays the same (in the closed position). When you click to close the toggled window (the 2nd click), the arrow finally swaps to the down/toggled position, even though it's the 2nd click and the window has now been closed. The arrow continues in this "off by one"
[jQuery] Problem on IE with jqModal
Hello! I'm using jqModal on my website. When It's running on Firefox it works great but when it's on IE it's looks like the screenshot attached to this message. http://www.nabble.com/file/p15433219/screenshot.jpg How can I solve that? (I'm using the latest IE version - IE7) Thanks! Eyal
[jQuery] Is it possible jQuery do similar actions width $("this") such as selectors like $("DIV A")
Firstly, sorry for my english, but it's very important to me know the answer :). For example there is such a code: <dl> <dt>Menu</dt> <dd>SubMenu1</dd> <dd>SubMenu2</dd> <dd>SubMenu3</dd> </dl> i call function: $("dl").bind("mouseover", function(){ I get the object DL, witch now may to call like this or $ (this): How I can get now DT or DD using this ? I know that can do like $("DL DT") or $("DL DD")? But now in $(this) I have yet selected DL How can i use this with selectors?? $("this DT") - not
[jQuery] jqModal Element Blocking
Is it possible to only block elements (such as DIVs) using the jqModal plugin? This would be similar to what the BlockUI plugin does, but I need more options than BlockUI offers in modal dialogs.
[jQuery] Some sort of template for displaying validation errors in a div using validation framework?
I'm using the very nice jquery validator for my forms, but I have, what hopefully is a simple question. I like being able to defined all the error messages in the initial messages section in the jQuery setup: [CODE] messages: { firstName: "Please enter your firstname<br/>", userName: { required: "Please enter a username<br/>", minLength: "Your username must consist of at least 4 characters<br/>" } } [/CODE] I'm then setting the error label container: [CODE] errorLabelContainer: $(".errorContainer"),
[jQuery] Help With Modifying Treeview
I'm trying to modify treeview. I want to eliminate the plus and minus boxes, and use the section labels as hit areas. A tree of two main sections would just be "Section One" and "Section Two". Clicking on either one of these would expand it, and clicking a second time would collapse it. I can see where the div that acts as the hitarea is created in the script. I'm having trouble transferring the hitarea functionality to the anchor that serves as the section label. I don't have to transfer it to the
[jQuery] [validate] Adding custom behaviours following validation
I'm looking to modify the markup surrounding my form elements once validation has taken place so as to indicate success/failure with a particular input element's contents, and I'm wondering if the Validate plugin can do this without any modification? To give an example, imagine I have the following markup: <dl> <dt><label for="username">Username</label></dt> <dd><input name="username" /></dd> <dt><label for="password">Password</label></dt> <dd><input type="password" name="password" /></dd> <dt><label
[jQuery] Is it possible to send javascript vars TO a jquery function??
I've just barely started getting my feet wet with jquery, so please bear with this novice's question... With a javascript function you can accept vars like this: function doSomething(number, name) { //Do something with them } From an href in the HTML like this: <a href="javascript:doSomething('1234','john');>Click me</a> But I have no idea how this is accomplished with jquery as it all seems "internal" to itself (seemingly dealing only with identifying HTML tags, ids, and classes, and not user-supplied
[jQuery] Form Plugin: sender
I have a page with several forms, some of them being ajax-submitted with the Form Plugin: $('.inlineForm').ajaxForm({dataType:'json', success:process}); Is there a way I can get a reference to the form which has been submitted? (from the success function for example)
[jQuery] Can we detect whether images are turned off?
Hello again Still trying to adhere to 'Web Standards' while using (almost too many) whizzy jQuery effects, I see I'll need to provide some alternative text styles for users that don't see my lovely background images. I imagine Javascript can do the detection? Can you please advise - I read this: http://www.thewatchmakerproject.com/journal/53/images-offcss-on-image-replacement but am confounded by the last paragraph (the script)! Thanks :o Cherry
[jQuery] Help needed with AutoScroll plugin
Hi, Has anyone done any messing about with the AutoScroll plugin? (http:// jdsharp.us/jQuery/plugins/AutoScroll/) I'm looking to tweak it a bit but don't understand JavaScript / jQuery enough to wrap my head around it on my own. The behavior currently scrolls the entire window and does so only when you press a key (ctrl by default). I'd like the behavior to be restricted to just an element with an overflow and would like it to happen without keypress. Does anyone have any clue what I need to do to
[jQuery] jQuery won't recognise attribute names containing [square brackets]
I'm finding it impossible using jQuery to select any attributes with square brackets in them. I'm sure most people know PHP uses square brackets within form element names to submit multi-dimensional arrays, ie: contact[name] contact[email] contact[telephone] contact[options][option 1] contact[options][option 2] contact[options][option 3] This is read natively by PHP as: contact => array ( name, email, telephone, options => array( option 1, option 2, option 3 ) ) In a way, jQuery's refusal to recognise
[jQuery] Newbie question about Radio Buttons
Hi, I am thinking about using JQuery in a site I develop, but I am struggling to work out how to achieve what I want, so any advice would be appreciated. I have a matrix of radio buttons. I can ensure that only one radio per row is selected by giving the radio buttons on each row the same name. In addition to the "one selection per row" rule, I want to use JQuery to ensure that only one radio in each column is selected as well i.e if a radio button is selected, I want to unselect all the radios in
Toggle display UL element
I'm stuck! Can't figure out what's wrong with this: <ul id="menu" class='menu'> <li><a href='test'>Födelsedag</a></li> <li><a href='#' onclick='showSubmenu(1)'>Högtider</a><ul id="submenu1" class='menu submenu'> <li><a href='test'>Jul</a></li> <li><a href='test'>Påsk</a></li> </ul></li> </ul> My code: function showSubmenu(menuId) { $('#submenu'+menuId).style.display = 'block'; } I get the error: $("#submenu1").style has no properties Please help
[jQuery] Reading in the contents of a file.
Is there a way to get the contents of a file without actually uploading the it? Example: I just need the contents not the actual file. I need to parse the contents of a file on the fly and display it to the user. Thanks for any help. --tstrokes
[jQuery] Handling Event Bubbling in JQuery
Hi, I am attaching a mouseout event to a div and i want to hide the div when the mouse if removed from it. However, the mouseout function gets called even when i mouse my mouse from one element to another within the div.For example, <div> <img></img> </div> So somehow the div doesnt stay on the screen when i move the mouse around within it. I searched a little on it and its called event bubbling. How can we handle this in Jquery ? Does anyone have any suggestions??
syntax again - should be easy [kinda solved]
the first toggle function works but not the second. If I switch them around (first one second and second one first) then the first one is the one that works again. So the toggle function themselves work but not together. I mustn't be able to copy and paste as I suspected with js... $(document).ready(function(){ $("#buttoncomment").toggle(function(){ $(this).text("make comment"); $("#makecomment").slideDown('fast'); }, function(){ $(this).text("close
[jQuery] plugin to upload files
Hi, I'm looking for a jquery plugin that will help me upload files, some which may be large (> 20 MB). I have seen jqUploader, but it seems like that requires Flash and I would not want to i mpose that requirement on end users. Thanks for any advice, - Dave
[jQuery] Help with AJAX behavior
I'm having some trouble with getting some events to fire correctly upon AJAX completion. Basically what I am doing is going through a for loop that fires off an ajax call for each element in an array. When the results come back, if it is successful I want to change an image from an hourglass (waiting) to an check mark (success!). What I've come to after trying different things is creating two classes .waiting & .checked and have the following line: $('#'+manager).removeClass('waiting').addClass('checked');
[jQuery] Compressing javascript files in one file, problems with some plugins (dropshadow.js)
Hi, I'm using a php script that compress in gzip and in one file all my javascript files. The script and an explanation can be found here: http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files The script works very well, and times of download are decreased a lot. Before implementing this method, I was using this syntax <script type="text/javascript" src="lib/jquery/jquery-1.2.2.min.js"></ script> <script type="text/javascript" src="lib/jquery/ jquery.dimensions.pack.js"></script>
[jQuery] help,about the selectors
my code: $.ajax({ url: "test.do", dataType: "xml", success:paint }); var paint = function(response){ var compenonts= $(response).find("Component"); // what expression should be here?? compenonts.each(function(index, compenont_ele){ var compenont = $(compenont_ele); var name= compenont.attr("name"); alert(name); }); } I expect alert : a、b、c、d but actually alert : a、b、c、c1、c2、d test.do wil return : <Components> <Component name="a" /> <Component name="b" /> <Component name="c" > <children name="c.children"
[jQuery] localScroll Problem
im trying to use the localScroll pluginh in many ways :) but i receive this error when i click $("#comentar").click(function(){ $.scrollTo( '-=900', 300 ); return false; }); E.easing[this.options.easing || (E.easing.swing ? "swing" : "linear")] is not a function E.easing[this.options.easing || (E.easing.swing ? "swing" : "linear")] is not a function E.easing[this.options.easing || (E.easing.swing ? "swing" : "linear")] is not a function E.easing[this.options.easing || (E.easing.swing ? "swing" :
[jQuery] How to select last leaf of a tree?
Hi, I have an unordered list like this <ul> <li>Item 1</li> <ul> <li>Item 1.1</li> <ul> <li>Item 1.1.1</li> </ul> </ul> <li>Item 2</li> <ul> <li>Item 2.1</li> </ul> <li>Item 3</li> </ul> and I want to select only the leaf nodes (in this example namely Item 1.1.1, Item 2.1 and Item 3) I was wondering if there was an easy way to use jQuery selectors to perform such selection? What would be the simplest way to do it? I'm able to do the selection with a combination of selectors and javascript in callbacks,
[jQuery] Translate old JS function to Jquery - Super newbie question
If i have the following button: <a href="javascript:{}" class="positive" id="button_confirmAction" style="display: block;" title="Register" onClick="valid()"; return false;" > The aobve button calls the next function: function confirmAction( action ) { document.getElementById('button_' + action).style.display = 'none'; document.getElementById('button_back').style.display = 'none'; document.confirm.submit(); return false; } My super newbie question is? How do i can convert the function
[jQuery] bug with animate and a duration of 0 milliseconds?
I noticed a bit of an oddity when playing around with the hover state of an object and animations that I'd like to describe. First, I'll give you some sample code. In my body, I have the following two links: <a href="#" style="display:block;height:100px;width:100px;line-height:100px;background-color:red;text-align:center;" class="zero">zero</a> <br /> <a href="#" style="display:block;height:100px;width:100px;line-height:100px;background-color:red;text-align:center;" class="one">one</a>
[jQuery] show/hide flyout menu panel
Hi all, my first post to this list, having exhausted the tutorials, plugins and documentation. I am building a flyout menu, where each flyout is a scrollable div (using jScrollPane for custom scrollers) containing a heading and unordered list of many items. Each flyout div is triggered from an anchor inside the primary navigation unordered list items. I have the flyout working using show/hide on the primary nav anchor except it disappears before I get to the scrollable div. Q. Are there standard
jCarousel help with IE6...
I've been trying to fix this to no avail for the past 2 hours. HeEre's the page in question: http://css.rolled.at/eudemonics/case-study.html It works perfectly fine on all major browsers but IE6. IE6 will stack all the images to the right of the element and ignore the overflow property. It will also not scroll at all when I click on the arrows. To prevent the images from stacking aside each other, I added this piece of css: .jcarousel-container { width: 284px; overflow: hidden } That keeps
[jQuery] Getting the highlighted text
I have a textarea and a button that allows me to select some text and apply a span and class to it. What I need to do is select that text later and remove the span and class by clicking on a button. I think I can handle to part that removes the span and class, but I don't know how to get the selected text after I've highlighted it. Can anyone help me?
[jQuery] Assigning an animation toggle to a checkbox to fade a table row in/out
I have created a table, at the end of each table row is a checkbox. When the user selects the checkbox, that row will fade out to give the illusion its now disabled. When the checkbox is unchecked I want the row to fade back. Can this be done? I have managed to do it rather crudely in the following example: Javascript................................... <script> $(document).ready(function(){ $(".deleteRow").click(function(){ $("tr").animate({ opacity: 0.2, }, 1000 ); }); }); </script> Html...................................
[jQuery] Plugin-Request: Boxover?
Hey guys, iam using a great piece of JavaScript-Code from time to time, its named "BoxOver" and is a ToolTip-Script for JavaScript which can be found here: http://boxover.swazz.org, some examples: http://boxover.swazz.org/example.html . I've searched for a similar Plugin for jQuery, but nothing was that flexibel and lightweight (boxover is just 5kb compressed). My idea is, to port this great peace of code to an flexibel jquery- plugin. Normaly, you configure BoxOver over the title-attribute... with
[jQuery] Hash as URL
Hi there, I have some links on a page inside <div id="files"></div>. They link to the same page, but with a different hash. The hash should define what url will be loaded into #files. I have the script below: <script type="text/javascript"> $(function() { $('#files').load("index.php? explore="+location.hash.substring(1)); }); </script> It works when someone goes to the page with a defined hash, or if you refresh the page with a certain hash, but just by clicking the links and back/forward in the
Simulating tab event.
Hi all. I'm developing a web app that will be used by people used to using a green-screen. As such, they will probably be going through some system shock. On their old system, everyone is used to hitting enter to go down to the next input. On web forms this submits the form. I'm looking for a way to catch the enter key and instead act like a tab. Using the keypress event, I've canceled the form activation for all inputs but the submit button. Next, I want to trigger a keypress event with the tab
[jQuery] Using jQuery inside an ordinary function notes!
Hi, I have very little knowledge about javascript. I used it with ordinary functions and the code of jquery may make me confused. I used it in a javascript function some thing like that: <script> function avaChk(lnk,id){ alert('111') ob = document.getElementById('id'); $.ajax({url: 'chk_user.php',type:'GET', data: id+'='+ el, cache: false, dataType: "script", success: function(data, textStatus){ if (data == 0){ alert('222'); } else{ alert('333'); } }, error: function(x,txt,err){ $("#waitImg"+lnk).remove();
[jQuery] jQuery caching DOM refferences? Performance issues
Hi there! I've been dealing with some performance clean-up of a code of a web- app that I wrote and I was wondering if jQuery does caching of the DOM references. Lets say I have a function: function myFunction(){ $('#foo').attr("bar"); } I frequently refer to the function, so is it the case that each time I launch it, the DOM is scanned for element with "foo" id? Or maybe this reference is somehow cached? If its not, then maybe doing something like this would speed up the code execution: function
[jQuery] Copying menu item from one menu to another
Hi, Let's say I have a SELECT menu with id = "fromMenu" and if a user clicks the "Add" button, I want the selected menu item from the "fromMenu" to be appended as the last item in antoher menu with id = "toMenu". I'm sure this is simple. How can it be done? Thanks, - Dave
[jQuery] Do tabulations and spaces make a difference?
Hi! I just downloaded jquery today and the first thing I did was to start learning from this tutorial: http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery , but I am having trouble with this part: http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Find_me:_Using_selectors_and_events In that part, there is this code: $(document).ready(function() { $("#orderedlist li:last").hover(function() { $(this).addClass("green"); },function(){ $(this).removeClass("green"); }); }); That works
[jQuery] Problem with AJAXQueue: dequeue not a function
Hi there, I'm trying to write a plugin for the SmugMug JSONP API. One quirk is that they require a SessionID. So prior to asking for any data the initial JSONP call for the SessionID has to be returned. I think the AJAXQueue plugin (http://dev.jquery.com/~john/plugins/ ajaxqueue/) would be a perfect fit. Unfortunately the plugin throws and error: FireBug Console output: jQuery.dequeue is not a function complete()ajaxqueue (line 12) complete()jquery.js (line 2790) onreadystatechange(5)jquery.js (line
[jQuery] Disappearing events?
I created three table elements using jquery, and each td cell in the tables has hover and click events attached to it. The basic table generation is cached in an array and the only changes that happen to the initial content occur by updating individual td contents using $(this).text(val). All of the events fire correctly the first time a table is rendered, but when the table is updated, only using .text(..), the events disappear. I've tried tracing what is happening, but eventually get lost, and
Next Page