[jQuery] [Help]: A function that switches input box with select, and vice versa
Hello everyone. I'm trying to manipulate a country/state selector whereby I have a mapped array of country=> states in the form, and when a change() occurs in the country selector, that if state array is empty, an <input name="state" type="text"> will be shown, or a <select name="state"> will be shown.. So my logic is whenever an onchange occurs, that I destroy and recreate the "state" form element. I am very new to developing my own jquery logics (used to just modify existing plugins), so I can
[jQuery] Jquery cycle plugin and images included dynamically
Hi, I am using the jquery cycle plugin for slide effects of images being included dynamically to the website. Unfortunately, the images in the hidden divs will not show in their original size once being showed from the cycle script - just a icon size image is visible. How can i change this to maintain the real image size in all (also hidden) divs?
[jQuery] Jquery "Add Another and Hide" DOM functionality
Hello We are working on a Form Software and we are trying to implement, " Add Another, Remove" DOM functionality inspired by https://www.google.com/jobs/application/application Do we have Jquery plugins for this? Any freelancers willing to help out on this work? Thanks Prakash -- View this message in context: http://www.nabble.com/Jquery-%22Add-Another-and-Hide%22-DOM-functionality-tp16715140s27240p16715140.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Jquery "Add Another and Hide" DOM functionality
Hello We are working on a Form Software and we are trying to implement, " Add Another, Remove" DOM functionality inspired by https://www.google.com/jobs/application/application Do we have Jquery plugins for this? Any freelancers willing to help out on this work? Thanks Prakash -- View this message in context: http://www.nabble.com/Jquery-%22Add-Another-and-Hide%22-DOM-functionality-tp16715140s27240p16715140.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Binding click event handlers to dynamically added links
Hi, I am trying to bind Ajax click event handlers to links that I have dynamically appended to the DOM tree. Basically I have: var html = '<tr><td><a href="someurl">text</a></td></tr>' $("#table > tbody").append(html); If I try to add click handlers to these anchor tags, they don't work. $("a").each(function(i, dom_element) { $(dom_element).click(function() { $.get('/shopping-cart/remove/'+i+'/', function(xml){ alert('test: '+i); alert($("numbers", xml).text()); }); return false; }); }); Anchors
[jQuery] Cutting load time with jQuery plugins
Hi, Our site is mainly a jQuery shop, with lots of JavaScript goodness: http://www.freeidentityprotect.com. We're using a number of plugins including the newer UI (dialog & accordion), Enchant, SimpleModal, Form, Validation, Dimensions and some homebrew. I've noticed load time is a little slow on some of our pages and I've attempted to combine some of the files to reduce it using the tool found here: http://betterexplained.com/articles/speed-up-your-javascript-load-time/. It worked for some of the
[jQuery] Updating a Textarea
I'm a tentative "switcher" from Prototype. Not sure yet... I'm porting one app to see how it suits me. One of the frequent things this app does is work with text in a textarea. Let's say the id of the textarea is "inputbox" ... I find myself writing code like: $('#inputbox')[0].value = json['results']; I understand why this works and the Prototype'ish version $ ('inputbox').value = 'foo' doesn't. I'm just wondering whether there is a different, more idiomatic way. Thx
[jQuery] select events
Hi, I am writing an app that uses both jquery and regular javascript (is this bad?). I have two groups of jquery tabs, each with form fields in them. I want a select list to trigger a specific tab if the value slected = 2; Can you trigger jquery events from other javascript functions? If so, how? I figured it would be easier to do this within jquery. But I can't get my jquery to work. Here is what I have so far. $('#hispeed_type').change(function(event) { if(this.value
[jQuery] [validate] - need help with a <select> list !
Hi, i'm using jquery plugin to validate my form. I have two questions. 1. Why does deleguate.js is required and what is it doing ? 2. I have a form with a list like this one : <select id="imputemail" name="imputemail" class="required"> <option selected="selected">Select from this list</option> <option value="Value 1">Value 1</option> <option value="Value 2">Value 2</option> <option value="Value 3">Value 3</option> <option value="Value 4">Value 4</option> <option value="Value 5">Value 5</option> <option
[jQuery] [validate] how to apply validation on fields that have object naming (non flattened model objects) on them?
<input id="number" name="user.number" title="Please enter a number with at least 3 and max 15 characters!" /> Using validation rules on this field rules: { number: { required:true, minLength:3, maxLength:15, number:true }.... When the field is named as "name="number" validation works properly however, if the field is named as name="user.number" I am not sure how to apply
[jQuery] Live Window Size (n00b alert)
This works on mouse up, anything that works live? So that alert would be firing off annoyingly frequently - as the user drags the mouse while resizing? $(window).resize(function(){ alert("Stop it!"); });
[jQuery] How to make <input type="text"> auto-expand when there's more text ?
Hi, I need to make <input type="text"> auto-grow when there's more text that can fit in it.. I was unable to find any plugin for this, found only for <textarea> (http://www.aclevercookie.com/demos/autogrow_textarea.html) Anyone saw something similar for <input type="text"> ?
[jQuery] select list and tabs
I've got a form with jquery and regular javascript mixed (is this bad?), along with 2 groups of jquery tabs with form fields within them. I am trying to get a select list to activate a particular tab. Here is what I have so far. $('#hispeed_type').change(function(event) { if(this.value == 2){ $('#containerA').triggerTab(4); // triggers third tab } }); #hispeed_type is the select list #containerA tab 4 is what I'd like to
[jQuery] Dynamic Add Row
I have this script: http://ts.7079.net/ischema/addBlock.cfm I've been playing with it for quite some time and cannot figure out how to get it working right. When you click the "Add Query" button, it should give you a block that will allow you to add individual rows within them. The only "Add Join" link that works is the very first one and it will append to the last block that was added. If you click the "Add Query" link and than try clicking the "Add Join" links, you will see what the problem is.
[jQuery] jEditable issue in Firefox 2.0.0.13
Hi all, I am building a really simple jEditable (plugin) implementation with the latest jQuery SVN. Trouble is I can't get it to work in Firefox 2.0.0.13. In this example in Firefox, no cal is being made to the php file (php/ tabsave.php). It's just not attempting to call it at all. IE7, 6 and Safari are all working fine. Anyone got any ideas? (and is jEditable the best edit-in-place plugin for jQuery anyway?) Cheers, Steve $(".tabEdit").editable("php/tabsave.php", { event: "dblclick", tooltip:
[jQuery] Improving upon the jQuery Plugin Template
I appreciate the effort that Mike Alsup put into his plugin template. http://www.learningjquery.com/2007/10/a-plugin-development-pattern The example is crafted to be simple and it is effective for its purpose. I would like to add additional functionality and I am unsure how to modify the plugin to support the new feature. I am interested in how the template can be extended to support a callable API once the object has been jQueried. Let me explain using Mike's example as a starting point. His example
[jQuery] Remote JSON Ajax call - error function not called
Hi, I am trying to retrieve JSON Data from a remote server and manipulate teh returned data. That all works fine - the callback is executed and it all works as expected. The issue I am running into is that I want to use timeouts and error messages also - and they are not working. I tried the following code (just demo code - not the one I am using) $.ajax({ type:"GET", url: "http://www.thisSite.com/badurl.asp", data:"jsoncallback=?", dataType: "json", timeout: 1000, error: function(){ alert('Error
[jQuery] Auto submit suggestion
Hello All, Implemented "suggest" to my site and it's working fine the only problem I experienced is that I could not find an "easy way" (like pre- set definition) to automatically submit the form when the user select a suggestion. Am I missing something or the only option would be to assign id to each form tag and submit it upon selection? BTW, I'm using jquery.suggest 1.1 - 2007-08-06 with jQuery 1.1.3 Thanks
[jQuery] Selecting a specific number of children rather than number of specific elements
Hi All, I was wondering if someone could help refine a content toggling solution that I have now. As of now, the demo page below takes the first 3 elements within a parent <div> with a specific ID and hides the remainder of the paragraphs in this parent <div> by placing them in a newly created <div> and then creating an <a> element that toggles the visibility of this new <div> container. http://brian-talbot.com/inventingroom/jquery-expand/ I'd like to be able to include other elements besides within
[jQuery] Iterate through multiple slideshows on one page
I currently have code that can iterate through a group of div's to act as a slideshow. What I am trying to do is have multiple groups of div's with the same class be on the same page and have each slideshow act independently of the other. Can someone please take a look at this code and provide any suggestions for making that happen. Thank you! jquery code: $(document).ready(function(){ //these scripts handle the rotating tip box var total = $('div.slideshow-item').length; $('div.caption').html('1
[jQuery] jqDock Plugin
Transform a set of images into a Mac-like Dock menu, horizontal or vertical, with icons that expand on rollover, and optional labels. (Not particularly new, but I needed it.) demo : http://www.wizzud.com/jqDock/ Feedback welcome.
Getting out data from $.get() ajax method
how can i extract returned data from ajax $.get() method, to be used in further code ?? my code is similar to this: $.get("page.php", {search: "42"}, function(data){ var storedData = data; }); alert(storedData); //not working, but helps illustrate the situation i know its a noob question but i just can't get through this thx for any replies.
[jQuery] Pairing Toggle/Expand Behavior with Particular Element Pairs
Hi All, I was wondering if anyone had any insight into an issue I'm having when using JQuery to show/hide a series of elements on a page. I currently have a set of comments (to be placed in a larger page) and along with each comment a form is needed to allow users to flag an individual comment. I've tried to create this page with accessibility in mind so there is one unique form (with its own ID) for each comment (also with its own ID). You can view a sample page without any styling here - http://brian-talbot.com/inventingroom/flagcomments/
[jQuery] object.prototype
I have been using the jquery for a long time now.. then I've decided to at least write a simple Ajax class of my own as a part of learning, and as I'm waiting for John's new coming book(I read somewhere on the forum from his site that it will teach you how to write your own library...) . I just discovered this and please verify me if im correct... when you declared a property in the prototype as a subClass/ a sub object, and if you creates/add its property its actually writing to its prototype. because
ie7 sortable vertical error
I apologize is this is noted in the forum already (please just put a link up if it is -- I ran searches and couldn't find the thread). I'm using the sortable feature for a list and on IE 7 and when I click and begin to move the element, it is displayed ~200px below where the mouse is. Does anyone know a fix/hack for this? Thank you. I'm not a jquery guru, but happy to return the favor with some ROR advice. -matthew
[jQuery] To the Moderator
Hi Is there something wrong with my membership settings ? Non of my questions have made it to the list yet. Regards, Louis.
[jQuery] Validate plugin 1.2.1 backward compatibility break
**Apologies for the repost; had to correct the subject line. Anyone know why text in square brackets is removed when posting via Google Group's web form? Hi Jörn, I believe I've discovered a backward compatibility break when upgrading from 1.1.2 to 1.2.1 of the Validate plugin. After a few days of sorting through the problems I've had, I think I've narrowed down issue down to the fact that the current version assumes in several places that the form you're validating is actually an HTML form element.
[jQuery] jQuery-modified CSS 'display' property lost after "back" button
Hi, all I've used jQuery to have the "display" CSS property of a block that was initially visible modified to "display:none" based on user interaction, which works fine. However, if the user then navigates to a subsequent page, and then uses the "back" button on their browser, the starting page no longer has the desired blocks hidden. Any ideas why this might be? Any workaround? Thanks!
[jQuery] jqModal + Form plugin - Page is reloading in Firefox on form submit, IE works perfect
NB: Apologies if you're receiving this question second time, my earlier post doesn't show up even after 3 hours Hi, I've tried a million workarounds for this, but it just doesn't seem to work in Firefox! I fire up a jqModal login box which is calling a separate html page, which connects to a php login script, and if success, the php returns a success message in the Modal and reloads the parent page, i.e. page containing the Modal html, thus loading the new Session. If unsuccessful, it just gives
[jQuery] :not filter not working in IE 6/7
Hey guys, One of my scripts doesn't work in IE but I've managed to find the offending code, not thanks to IE... var dave = $("a:not(a[onClick*=pageTracker._trackPageview])[href $=.pdf], [href$=.rtf], [href$=.ppt], [href$=.txt], [href$=.mp3], [href $=.xml], [href$=.exe], [href$=.zip], [href$=.rar], [href$=.dmg], [href $=.tar.Z], [href$=.tar.gz], [href$=.tgz]") alert ( dave ) So using the above code dave is undefined in IE (works fine in Firefox) But using this code with the :not filter removed var
[jQuery] Horizontal scrolling with JScrollPane
Is this possible to do? I only found how to make it on a left side but I need it very much at bottom. Please, help. Alex
[jQuery] wait for function to complete before continuing loop
Ok. I think the best way to explain this will be by an example. This is pseudo code to a degree. $.each(data, function(i,item){ myFunction() }); Now. 'data' is from a json call. this works. 'myFunction' does all sorts of stuff. It adds an li, then populates it with a bunch of stuff from ajax calls, and this works too. however, because it does so much, if i just let it loop away, it gets all confused. so, i put in a variable (window.lockAdd) to lock 'myFunction' from running again until its all
[jQuery] Wait for custom function to complete before continuing...
Ok. I think the best way to explain this will be by an example. This is pseudo code to a degree. $.each(data, function(i,item){ myFunction() }); Now. 'data' is from a json call. this works. 'myFunction' does all sorts of stuff. It adds an li, then populates it with a bunch of stuff from ajax calls, and this works too. however, because it does so much, if i just let it loop away, it gets all confused. so, i put in a variable (window.lockAdd) to lock 'myFunction' from running again until its all
[jQuery] Console buggy? ACL query too.
Hello, Since the console is buggy for Windows, I cannot enter absolute paths for the app, I want to execute the command for ACL so that ACL tables are built. I've wasted a lot of time in this simple thing, can someone please help me and export the structure of ACL tables in SQL format for me? Thanks, Haris
[jQuery] jScrollPane: horizontal scroll and dynamic height/width
Hello, I have just found this nice little piece of JS while I was looking for a nice script to replace this cruel scrollbars from my site. Anyway, I miss two features and thought it would be more clever to ask here if someone has already customized the script in the way I need it before I try it by myself (I'm not a JS expert). I have two problems, first of all I need the possibility to scroll the div horizontal and vertical, the second problem ist, that height and width of my div have to be dynamic,
[jQuery] jscrollpane horizontal
is there a way to use jscrollpane (this exelent plugin) the horizontally way? please help me greet jens from germany
[jQuery] Setting option to selected
Guys, I wanted to set an option in a select element to "selected". The options are being created on the fly. The rules are simple. If there's more than one option, then set the second option to "selected". Otherwise, set the first option to "selected". I tried to use a ternary operator but it failed: $("select#cert_id option:eq((i > 1?1:0))").attr( "selected", "selected" ); If I use the code below, it works: if (i > 1) { $("select#cert_id option:eq(1)").attr( "selected", "selected" ); } else
[jQuery] problem with focus() and IE
I wrote a simple little bit of code to set focus on the first visible form element in a form $('#tab0 table tr :input:visible:first').focus(); It works great in Firefox but IE throws the error " 'this.parentNode.borderCss.on' is null or not an object " I also tried $('#tab0 input:eq(0)').focus(); with the same results - works in FF, gives that error in IE any ideas?a
[jQuery] Remote JSON Ajax call - error function not called
Hi, I am trying to retrieve JSON Data from a remote server and manipulate teh returned data. That all works fine - the callback is executed and it all works as expected. The issue I am running into is that I want to use timeouts and error messages also - and they are not working. I tried the following code (just demo code - not the one I am using) $.ajax({ type:"GET", url: "http://www.thisSite.com/badurl.asp", data:"jsoncallback=?", dataType: "json", timeout:
[jQuery] problem with POST through ajax
Hi guys, i don't understand if it is a problem on my server or with ajax at all I'm sending POST data to server through ajax in jquery but the server reports no data received (php $_POST['data'] is empty). However it occurs only when the size of the data is over 50kb or so... what can it be?
Next Page