[jQuery] Change event for hidden form field
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=998090815-28082008><FONT face=Arial size=2>I'm modifying the value of a hidden input field from a popup window. I thought it would be a simple thing to bind a change event on this field so that when it's value changed, something else would happen. This doesn't seem to work.
[jQuery] mooMonth inspired calendar
I've been using Mootools for a few sites now but I want to program my next site purely in jQuery. So far so good, Moodalbox to FancyBox, Sliding Tabs to localScroll, but there is one feature I haven't been able to find the equivalent of - mooMonth (no longer being developed but had lots of promise). I posted a demo of it here: http://www.angelhousemedia.com/testing/layouts/month/. Not having much experience in jQuery, I'm wondering if anyone feels challenged to code the equivalent of this. Any takers?
combining $(this) plus other selectors
Hi friends I'm in my very first days with jQuery and already astonished with its incredible power. This is a very simple question but I can't figure the answer out. First, my xhtml (lots of nodes like this in <li> elements): <div class="titlebar"> <div class="title">XYZ</div> <a href="javascript:void(0)"><img src="images/close.gif" title="Remove" /></a> <a href="javascript:void(0)"><img src="images/edit.gif" title="Edit" /></a> </div> Those <divs> with the class "titlebar" has a couple of
[jQuery] Summarize Plugin trouble
Hello, I'm having some trouble with the summarize plugin. I'm using drupal 5.10 and jquery 1.2.6. The summarize code works perfectly when I just have text in the 2nd child element (the one that hides/shows). Ex code: <script type="text/javascript"> $(document).ready(function() { $('div.expandable').summarize({expandText:' Click here for more information...'}); }); </script> <?php print '<div class="expandable"> First content showing '; print 'text'; print '</div>'; ?> But, when I try to embed another
[jQuery] Understanding event delegation
I am working to replace all of my uses of livequery with event delegation (is this even a good idea?) and have a few questions. I have a simple script that will add a "selected" class to a link when it is clicked. It does work using event delegation, but it seems that it is not limiting it to anchor tags, but will also add the "selected" class to any spans that are inside my anchor. This seems strange, and is not what I want, is something wrong with the following code? $('body').click(function(event)
[jQuery] Attaching onAfter dynamically
Hi guys, i need something similar to the solution on http://malsup.com/jquery/cycle/goto.html, but with an addition: i want to be able to call $('#s1').cycle(2) with an onAfter handler and $('#s1').cycle(3) without it (basically, i want the onAfter to execute depending on a certain condition) Thanks in advance
[jQuery] Firfox 3 and Firefox 2
Dear folk , how could I run firefox 2 and firefox 3 at the same time ... is there any installation for both . or any trick.. or is there anything like IE Tester
[jQuery] problem using form.js and nice edit together.
hi all this is my first post here.. plz help. I'm using form.js malsup.com/jquery/form/ here and nice edit nicedit.com/ here for a news submission form. I have written a code to retrieve data from my DB (via JSON), when user changes the news_id combo box. It fills the news_title and news_body of my form with out refreshing the page. Now I implemented NiceEdit to my text area (news_body) and the fill function doesn't seems to be working. :( but when i refresh the page using F5 it fills the data....
[jQuery] jQuery slideshow
I'd like to do slideshow by myself but I've met some problems. This example is quite simplified: var pos= 0; slide = function(){ currImg[pos].fadeOut("slow", function(){ curImg[pos+1].fadeIn("slow", slide() ); } pos = pos + 1; ); } It's wrong example because of recursion. How can it be made?
Jquery lightbox problem
Hi I'm using the jquery lightbox script called pretty photo (http://www.no-margin-for-errors.com) in conjunction with a jquery script that loads and animates the content (the content being the photographs to be displayed using the pretty photo script). The content loader script loads in content from a div called "content" so from my page the jquery script takes content contained in divs called "content" which are themselves contained in sub pages and loads them into a holder e.g. "about.html" loads
[jQuery] [TreeView] Lazy-load
Hello, I use the Tree plusgin of Bassassistance but I noticed the files in the lazy-load demo was not the same as the files to download. For example there is no image ajax-loader.gif in the files. I tried to add it and add in the CSS the code that's missing: .treeview .placeholder { background: url(images/ajax-loader.gif) 0 0 no-repeat; height: 16px; width: 16px; display: block; } But it has no effect. Thank you for any help. -- View this message in context: http://www.nabble.com/-TreeView--Lazy-load-tp19200398s27240p19200398.html
[jQuery] Validate and dynamically added controls
I have a form in a project that allows users to build up surveys. The form can have controls added dynamically as users add questions to their form. I need to be able to validate this form client side as sending a form to the server that it can't validate just results in an error message and the form being lost (The server side validation is fine, but how to handle an invalid form server side will need to be made friendlier) so I want to avoid sending such forms if I can avoid it. What I basically
[jQuery] missing ; before statement
I am get error missing ; before statement on different lines of jquery code. I provided all necessary ; (semi colon) but still getting error. Can anyone help me in resolving this problem as it is really headache for me
[jQuery] Transfer effect in UI
Dear folk , I tested the Transfer effect in http://ui.jquery.com/repository/latest/demos/functional/#ui.effects.general on Safari 3 , it doesn't work .... what is the problem ... I would like to use Transfer Effect .... Regards Pedram
[jQuery] New plugin - date picker
I know UI has a date picker already, yet I hope some people may want different features and layout options. http://eyecon.ro/datepicker
[jQuery] Why do a recursion while window unload?
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Another question, in jquery.js(include version 1.2.3, 1.2.6 etc.) why add this code:</div><div> 1. // Prevent memory leaks in IE </div><div> 2. // And prevent errors on refresh with events like mouseover in other browsers </div><div> 3. // Window isn't included so as not to unbind existing unload events </div><div> 4. jQuery(window).bind("unload", function() { </div><div>
[jQuery] [general] select all non-empty inputs
Hi, I want to select all the values from the filled in/checked/selected fields in a form and concatenate them in a string so I can pass it on to the history plugin. I have written working code, but I feel that it could be simplified. Any suggestions? var args = ''; $('.advancedSearchForm :input').each( function(){ switch($(this).attr('type')){ case("text"): case("select-one"): if($(this).val() != '' && $(this).attr("hidden" != "true")){ args += $(this).attr("name") + "=" + $ (this).val()+";"; };
[jQuery] jqModal and div
http://dadoodesign.com/jqDemo/ IE6 ISSUE** As you can see when the button is pushed, the modal pushes the div down? Tried playing with the Z index but that didn't seem to solve the issue. Not worried about placement of buttons or other css attributes right now. Just trying to resolve gap that's created. Any help would be great! Thanks Tony
[jQuery] Plugin function does not exist.
$.fn.selectMatch = function(x) { for (i=0; i<this[0].options.length; i++) { if (this[0].options[i].innerHTML == x) alert('found it'); } return this; }; in my script im calling $('#optionselect').selectMatch('test'); firebug blows up and tells me that selectMatch does not exist. I have other function in this plugin that work, but they extend only jQuery itself ( $.funcname ) not $.fn.name Any ideas? Thanks
[jQuery] moving Div to a Div
Dear FOlk , I have a shopping cart when I click on the ( Buy this ) Button the product will be added to the Basket , the think is I would like to move the Image into the shopping automatically without any dragging ... so I need to move one Div to another DIv with jQuery animation could we let the system know where the destination is ... for example : I'd like this to be Graphically ... I think animate would help me ... <div class="data"> some Data </div> <div class='destination'> data goes here </div>
[jQuery] IE8b2 crash scenario
[apologies, I put this on the dev list but should really have put it here] IE8b2 will crash if you try to insert a text node after a float. This might not seem such a common thing to do, but remember that jquery parses html into nodes before appending - and if your html starts with a space then the first inserted node will be a text node and kabooom! I've put up test page here: http://partyark.org/html/ie8floattest.html This completely shafted my site (http://www.partyark.co.uk) where we use jquery
[jQuery] dumb form button element question
with .child I know I can get the number of children of a certain element, but if i have something like this <input type="button" class="buttonfun" value="Button One"> <input type="button" class="buttonfun" value="Button Two"> is there a way to know when i click on either one, that I clicked on child 1 of 2 or 2 of 2?
[jQuery] Attaching onAfter dynamically
Hi guys, i need something similar to the solution on http://malsup.com/jquery/cycle/goto.html, but with an addition: i want to be able to call $('#s1').cycle(2) with an onAfter handler and $('#s1').cycle(3) without it (basically, i want the onAfter to execute depending on a certain condition). Thanks in advance -- View this message in context: http://www.nabble.com/Attaching-onAfter-dynamically-tp19196338s27240p19196338.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Passing index of element to event handler?
Hi everyone, I'm looking for a neat way to pass the index of an element in a wrapped to an event handler bound to that element. Like so: $(container).find('a[href$=.jpg]').bind('click', {}, function (e) { // I want to access the index of the clicked element inside the wrapped set here doStuff(indexOfThisElement); }); Now, I can access it through: indexOfThisElement = $('a[href$=.jpg]',container).index(this); But I feel like there may be a more efficient way of doing this? Is there a way to attach
[jQuery] Targeting hidden elements kills each() process
Hi, General: I'm trying to access several elements on the page, some hidden, some not. When I try to call methods on these objects using each(), the process dies because of the hidden elements. Specific: I'm trying to target several flash audio buttons within a "playTone" div to tell them all to pause if they don't match an id: var sSearch = ".playTone[id !='" + id + "'] > embed,.playTone[id !='" + id + "'] > object"; $(sSearch).each(function () { if (this) this.pause(); }); This works great if all
[jQuery] keypress event using $(this)
I have a simple keypress event that throws an alert when you press "a" or "s". Is it possible to bind this event to specific elements, so that it is not a global keypress, but only fired if the test link is first clicked. Then, $(this) would be used to get attributes of the clicked element if needed. Any ideas on how to get that to work, or if it is possible? $("#test").keypress(function(e) { switch(e.which) { case 97: alert("A pushed!"); break;
[jQuery] Alternate colors does not work when sorted - Tablesorter
<div dir="ltr">Hi, Tablesorter plugin - Alternate color does not work when you sort on a particular column. Any solution for this.<br clear="all"> -- cheers !! ramesh r </div>
[jQuery] $(div.tabs > div.containers) in Safari 3
Hi, I have been learning Jquery and been following along from a tutorial I found online. I have used the latest jquery file, the tutorial is few months old. The script below does not work in Safari because I used the following selector : $('div.tabs > div.containers') instead of $('div.tabs div.containers'); Why does this not work? I believe Safari 3 is supported by Jquery. Thanks all. My Code: <html> <head> <link href="stylesheets/reset.css" type="text/css" rel="stylesheet" media="all"
[jQuery] Validate or Masked Input plugin for entering/validating times?
Hi there, I have a text input into which a user is supposed to enter a time in a format like "hh:mm" or "h:mm". I was thinking about using the Masked Input plugin for that, which works pretty well for the format "99:99" but doesn't check if the numbers entered are valid hours/minutes. As far as I could see, there is no easy mechanism to make that work for this plugin. Does anybody have experience with that? On the other hand there's the Validate plugin, which is more easily extendable. I guess I
[jQuery] IE and safari bug with jquery.each and $.ajax
I think I've found a bug in jquery in IE7 and safari, seems fine in FF3. Try running this code in IE7. The alerted index comes out randomly incremented. $(function() { var dataItem = $('li'); $(dataItem).each(function(i,item){ $.ajax({ url: '/ajax', type: "POST", data: "getTPL=true&tplPath=product/ personalise_new~personalise_frames_item", success: function (msg){ alert(i);}, timeout: 3000 }); }); });
[jQuery] ReNestableTree, raw code
Hi, I just cooked up this code allowing a tree structure to be re-nested. It works very similar to the NestedSortables plugin, except that it doesn't allow to sort the list, only to change the nesting of elements. Its way more stable than NestedSortables (at least in my tests so far), has no dependencies other than ui.draggable and ui.droppable, works with the latest versions of jQuery and is very minimalist. What's it good for? It's perfect as an admin interface for tree structured data, like, say,
[jQuery] Can anyone explain the jitter in my website using the "slide" effect?
I am building a website and using the "slide" effect to transition objects in and out of the screen. For some reason, in Firefox 3, the "slide" effect using {direction: "down"} creates a weird jitter at the bottom of the div that is sliding down. The website to see is www.freewebs.com/edauenhauer. Click on one of the songs on the side and then click on any other song or on the "close" button. The jitter occurs at the bottom of the screen when it closes. Here is the jQuery code I'm using. Functionally,
can't slide up and fade out at the same time
Hello. I have a simple jQuery problem with built-in animation. I need a div to fade out and slide up at the same time. I tried this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Smell the Funny</title> <script src=/js/jquery-1.2.6.pack.js></script> </head> <body class=MAIN style="background:#FFE"> <div id=aaa style="background:#FEE"> xxx xxx xxx xxx<br> xxx xxx xxx
Simple animation help
Hi, I am a newbie trying to learn how to chain animations -- that is, run a sequence of animations upon a click event, one after the completion of the other. Trying this obviously runs the animations concurrently: $("a").click(function() { $(".box1").hide('slow'); $(".box2").hide('slow'); }); Searching for an answer, I tried using a callback, but in this scenario, only box1 is affected. $("a").click(function() { $(".box1").hide('slow'); }, function() { $(".box2").hide('slow');
[jQuery] SimpleModal for lead generation
Hi there I am attempting to create a modal which will ask for an email address when a user attempts to download a document. The basic functionality is to capture a click, send document src (so redirecting from the modal can be done), send email address to remote page for processing, detect for errors (client and server side), redirect user to document whether they opted to enter email address or not. This is what I have so far $("a[rel='download']").click(function (e) { e.preventDefault();
[jQuery] Selecting text nodes
Does anyone have code for a text node selector? I saw this post: http://groups.google.com/group/jquery-en/browse_thread/thread/2dda27130338f1af/b04adcf147e15ab1 but the function textNodes didn't seem to work with the current version of jQuery. I'm a bit new to jQuery, but I ultimately want to do a regex find and replace on all of the text nodes in a tree (the function needs to select children, grandchildren, etc), so any tips on the best way to do that would be greatly appreciated. Many thanks, Tom
help with mouseOver event
For some reason I cannot get this to work. Following multiple tutorials online it don't work for me. $(function(){ $("#image").mouseOver(function() { $(this).addClass("newer"); }) $(this).mouseOut(function() { $(this).removeClass("newer"); }); }); my css .newer { position: absolute; background:url(img-des1.png) no-repeat; background-position: bottom center; z-index:100; } What I want it to do is display the img-des1.png when you mouseOver the div with the id of image. but
[jQuery] Binding Click & Double Click on the same object ?
Hi folks I did this before and can't remember how. If click and double-click are both bound to the same object, how can I stop the "click" from firing during "double-click" ? Thanks, Liam
[jQuery] Validate remote method don't work
Hi, I've try to use remote method and not work. There are the parameters <script type="text/javascript"> $(document).ready(function(){ var validator = $("#formcode").validate({ rules: { codigo: { required: true, minlength: 3, remote: "valcodigo.php" } }, errorPlacement: function(error, element) { error.insertAfter(element); }, messages: { codigo: { remote: jQuery.format("El código {0} ya existe") } }, errorClass: "errores" }) }) </script> The form <div id="form"> <form id="formcode" name="formcode"
[jQuery] change event without losing focus
Hi, I want to have a simple event that notifies me whenever some <input type="text" /> gets changed its content. But I can not use change() because it only fires when the input changes and the input loses focus. The event I would like would be an mixture of keydown, keypress, paste, ... events. Do you guys know an easy way to have an event that fires when an input changes content without the need of losing focus? Eduardo
Next Page