[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 $(.data).move(.destination); thanks and regards Pedram
[jQuery] Re: IE and safari bug with jquery.each and $.ajax
Do they all come through? You realise that the AJAX responses aren't guaranteed to return in order. Karl Rudd On Thu, Aug 28, 2008 at 12:00 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 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=truetplPath=product/ personalise_new~personalise_frames_item, success: function (msg){ alert(i);}, timeout: 3000 }); }); });
[jQuery] Re: Validate and dynamically added controls
I've managed to get an example up for you to look at now, it's at http://cms.merus.co.uk/editsurvey.php.html and the javascript for the editor is at http://cms.merus.co.uk/surveybuilder.js At the moment only Question attempts to attach rules to fields, when a new question is added its Label field gets a {required: true} rule added. This doesn't seem to work, however. The call executes without any errors being thrown, but the validator doesn't seem to acknowledge the rule. The rule is being added at line 349 of the javascript file. On Aug 16, 2:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Well, a testpage would help debugging it a lot. Jörn On Fri, Aug 15, 2008 at 11:03 PM, Gordon [EMAIL PROTECTED] wrote: That's kinda odd, I do do the validate() on the form on document ready, and I'm getting no javascript errors of any kind. The rule being added just isn't executing (just a simple required:true for now while I test it). On Aug 15, 5:37 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: There must be a specific error in your code, as adding new inputs to a form is generally supported, without any further hazzle that what you have in your example. Its important that the form where you add the element has the validation code initialized, but thats about it. Jörn On Fri, Aug 15, 2008 at 5:42 PM, Gordon [EMAIL PROTECTED] wrote: 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 need is a way of adding validation rules along with controls so no matter the configuration of the form when it's submitted the validator can check that it's well formed before sending it to the server side script. I was hoping setting validation up on the form on load and then using rules ('add') on each control as I add it would work but it apparently doesn't For example, after an Add input button is clicked, code like below (heavily simplified for clarity) would be executed: var newControl = $('input type=text name=(unique name generated earlier on goes here) /') surveyForm.append (newControl); newControl.rules ('add', {'require': true}); This doesn't seem to cause any javascript errors, but hitting the submit button doesn't cause the newly added control to be validated. Is there something I need to do other than add a rule? Or can't this be done yet? I seem to remember the above approach worked in 1.3.1 but the other problems with that version means I can't use it with my project.
[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 can make a custom rule for a time format... I'd like to ask for any hints/suggestions/objections (I for example had the feeling a masked input can be a bit confusing)... Thanks! Cheers --Klaus
[jQuery] Re: Can anyone explain the jitter in my website using the slide effect?
Get that element to stop changing in height and it should help. Is there any way to use the slide effect in jQuery without it changing the element's height? There isn't any specific reason I need to use slide, I just thought it looked cool, but if that effect is going to always jitter because it changes the height then it isn't worth it.
[jQuery] Re: AutoComplete Detecting mustMatch failure.
I'm running into something similar. The result handler has no corrollary for cases where you aren't using mustMatch, and want to take some action if the user doesn't select something. For example, I want to put the ID from the extra data value into a hidden field when it matches, but want to clear that hidden field if it doesn't match. I don't see a foolproof way to do this right now via events from the autocomplete. So, instead I have a second JavaScript function that is attached to the blur for the autocomplete field that goes and looks up the value in the autocomplete field to see if it exists, and takes that result and populates the hidden field (or clears it, if no match). But, this is clearly poor, given that it causes a second AJAX request when none is actually needed. So, is there a way to get an event in the case where result won't get called? Or, can someone point me at where I might hook into that in the autocomplete code? I'm not as experienced with JavaScript, so haven't (on relatively quick glance) found the appropriate place to hook in to add another hook/callback. On Aug 20, 3:34 pm, Brad [EMAIL PROTECTED] wrote: I found a workaround, but it isn't great. If I attach a .blur(handler) to the autocomplete field I can clear the related fields when the user leaves that field by checking for val()==''. I'd love to hear that there is a way to do the same when mustMatch clears the autocomplete field. I'd like to clear the related fields immediately and not wait for the user to go to another field. On Aug 20, 2:45 pm, Brad [EMAIL PROTECTED] wrote: Changing subject. I had originally entered [AutoComplete] Detecting mustMatch failure and the forum ate [AutoComplete]. On Aug 20, 2:40 pm, Brad [EMAIL PROTECTED] wrote: I have a number of fields that are using the AutoComplete plugin instead of select menus. When a user enters and selects a match a number of other fields are populated via a .getJSON. $(#f_orig_lookup) .autocomplete( index.php, loc_lookup_obj) // loc_lookup_obj is a shared configuration object. .result(function(event, data, formatted) { if (data){ $.getJSON( ?type=remoteaction=location_by_idid=+data[1], function(data){ loadLocationInfo(data,'orig'); }); } else { // debug alert ('no data'); // - THIS NEVER ALERTS } }); The problem I have is this. A user does a lookup, then returns to the same field and enters non-matching text. The mustMatch causes the autocomplete field to clear, but the autocomplete .result doesn't fire What I need to do is clear any pre-filled fields if mustMatch. Is there any easy way to detect that the mustMatch did it's job?
[jQuery] Selectors and changing source of HTML-elements
Hi everyone, this is my first message to the jquery group, hope you don't mind and i'll improve over time :) My HTML is this: ul id=gallery li h2a href=#targeturlwww.targetlink.com.whatnot/a Title/h2 img src=thumb.jpg alt= / pLorem impsum /p /li First i'd like to find the IMG tag from every #gallery LI to apply a hover function to the image inside the specifil ul that has been hovered. I tried different versions, and thought this one would be ok, but not working $(#gallery li).hover( function(){ $(this,img).addClass(over) } } Secondly i'd like the heading H2 inside the LI to change when i hover it, i got it partly working, it changes when i hover, but i'd like it to return to it's original state after that. The code i use ise here: $(#gallery li h2 a).hover( function(){ $(this).replaceWith(a href=#the_same_link_as_it_was_beforeI am the changed text/a); }, function () { $(this).replaceWith(this).text; } ) and the last one i'm just puzzled with. I'd like to dynamically add a DIV element to the inside of an UL, just before ending the ul tag (/ UL) on mousover, which is quite easy, but i'd like to remove it on mouseout... My current code (which does nothing) goes like this: $(#gallery li).hover( function(){ $(this).wrap('span style=border:1px solid green;float:left;/ span') .parent() .append('div id=divver/div') }, function () { $(this).css('borderColor','red') /*just for testing*/ } ) Thanks everyone for any guiding me in the right direction, I'm eager to learn more about jquery every day! Cheers, V.
[jQuery] Cycle - goto
Hi guys, i need something similar to the solution on http://malsup.com/jquery/cycle/goto.html, but with an addition: i'd like to specify if the scrolling is to be 'forward' or 'backward', so it would be something like: $('#s1').cycle(2, 'forward'); or $('#s1').cycle(2, 'backward'); For example, if there are 4 DIVs and I am on DIV number 2, if I call $('#s1').cycle(3), i want the third DIV to come from the right side; if I call $('#s1').cycle(1), i want the first DIV to come from the left side; Is that possible? I mean, is it possible to specify programatically if the next DIV is comming from the right side or from the left side? Thanks in advance -- View this message in context: http://www.nabble.com/Cycle---goto-tp19182233s27240p19182233.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: dumb form button element question
Give the buttons a unique ID and get the ID using the attr function On Aug 27, 9:12 pm, Maarten [EMAIL PROTECTED] wrote: 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
[jQuery] Alternate colors does not work when sorted - Tablesorter
Hi, Tablesorter plugin - Alternate color does not work when you sort on a particular column. Any solution for this. -- cheers !! ramesh r
[jQuery] Re: File Upload
Hi, you can also try www.swfupload.org, it is fully configurable. On Aug 28, 5:05 am, Karl Rudd [EMAIL PROTECTED] wrote: The file input doesn't style very well, at least on all browser. Have a look here: http://www.quirksmode.org/dom/inputfile.html You can kind of fake it, that is you hide the actual input and do some tricks with JavaScript. There's a jQuery plugin that does this by the looks of it: http://www.appelsiini.net/projects/filestyle (found via a Google search for css file input jquery) Karl Rudd On Thu, Aug 28, 2008 at 11:46 AM, shapper [EMAIL PROTECTED] wrote: Hi, Does anyone knows how to style and input of type file with JQuery? I want to use an image as the button or maybe a simple normal input styled with CSS. I also want to style the input where the path is ... I want it to have a grey background and no border. Any idea of how to accomplish this? Thanks, Miguel
[jQuery] Re: ReNestableTree, raw code
I'm actually going to follow this up with a bug fix release already. ;-3 Includes a cross-browser fix and resolves some invalid event propagation that might occur. jQuery(function () { $('#sortableList li').draggable({ revert : 'invalid', start : function (e, ui) { $(this).hide(); var helper_id = this.id+-helper; $(document.createElement('div')).append($(this).html()) .css({ position : 'absolute' }) .appendTo('#list_container') .attr({ 'id' : helper_id, 'class' : 'dragHelper'}); $('body').mousemove(function (e) { $('#'+helper_id).css({ top : (e.pageY + 5) + 'px', left: (e.pageX + 5) + 'px' }); }); }, stop: function (e, ui) { $(this).show().css({ top : 'inherit', left : 'inherit' }); $('body').unbind('mousemove'); $('#'+this.id+'-helper').remove(); } }).droppable({ hoverClass : 'hoverDroppable', tolerance : 'pointer', accept : 'li', drop: function (e, ui) { if (this.id != e.target.id) { return false; } if ($(this).children('ul').length == 0) { $(this).append(document.createElement('ul')); } $(this).children('ul:first').append(ui.draggable); $.post('/server/url', { id : ui.draggable.attr('id'), parent : this.id }); } }); }); On 28 Aug 2008, at 14:14, David Christopher Zentgraf wrote: 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, a category tree. What's needed? Developed on jQuery 1.2.6 with jquery.ui.draggable and jquery.ui.droppable version 1.6b. Expects a nested list of data like: div id=list_container ul id=sortable_list li id=1Item 1/li li id=2Item 2 ul li id=3Item 3/li ... /ul /li ... /ul /div Here's the code: jQuery(function () { $('#sortable_list li').draggable({ revert : 'invalid', start : function (e, ui) { // creating a temporary div that will be dragged around. // works around some unwanted behavior, like being able to // drag elements onto their own children. // can be customized via CSS class .dragHelper $(this).hide(); var helper_id = this.id+-helper; $(document.createElement('div')).append($(this).html()) .css({ position : 'absolute' }) .appendTo('#list_container') .attr({ id : helper_id, class : 'dragHelper'}); $('body').mousemove(function (e) { $('#'+helper_id).css({ top : (e.pageY - ($('#'+helper_id).height()/2))+'px', left: (e.pageX - ($('#'+helper_id).width()/2))+'px' }); }); }, stop: function (e, ui) { $(this).show().css({ top : 'inherit', left : 'inherit' }); $('body').unbind('mousemove'); $('#'+this.id+'-helper').remove(); } }).droppable({ hoverClass : 'hoverDroppable', tolerance : 'pointer', accept : 'li', drop: function (e, ui) { if
[jQuery] Re: moving Div to a Div
This may not be exactly what you're looking for, but have you looked at jQuery UI's transfer effect?: http://docs.jquery.com/UI/Effects/Transfer http://ui.jquery.com/repository/latest/demos/functional/#ui.effects.general At the very least you could look at the code and see how to go about something similar. - Richard Richard D. Worth http://rdworth.org/ On Thu, Aug 28, 2008 at 5:02 AM, [EMAIL PROTECTED] wrote: 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 $(.data).move(.destination); thanks and regards Pedram
[jQuery] Re: Alternate colors does not work when sorted - Tablesorter
Use the Zebra widget for alt row coloring instead of your own coloring method
[jQuery] Re: keypress event using $(this)
Here are a couple options: 1) Set up the keypress binding on the element(s) and then wrap your switch in a conditional (if) that checks a flag your test link click would set to true 2) Event delegation: Set up the keypress binding at the document/some other higher level in the DOM. Use event.target to check whether the key was pressed on an element on which you want to handle 'a' or 's', otherwise ignore. - Richard Richard D. Worth http://rdworth.org/ On Thu, Aug 28, 2008 at 12:35 AM, hubbs [EMAIL PROTECTED] wrote: 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; // user presses the s key case 115: alert(S pushed!) } });
[jQuery] Re: Targeting hidden elements kills each() process
You could use the ':visible' pseudo-selector ( http://docs.jquery.com/Selectors/visible ) to target only the visible elements. - Richard On Wed, Aug 27, 2008 at 3:22 PM, Po Cheng [EMAIL PROTECTED] wrote: 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 the flash elements are showing. However, if some are hidden in an expandable/collapsable list above, it no longer works. Is there a way to: a. Keep the each() going on the visible elements. b. Target only the visible elements. Thanks in advance.
[jQuery] Re: missing ; before statement
sometime i m getting following lines with my ajax data instead of error HTTP/1.1 200 OK Date: Thu, 28 Aug 2008 11:50:39 GMT Server: Apache/ 2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 X-Powered-By: PHP/5.2.5 Expires: Mon, 26 Jul 1997 05:00:00 GMT Cache-Control: no-cache, must-revalidate Pragma: no-cache Content- Length: 3626 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/html is this server problem or what
[jQuery] Re: $(div.tabs div.containers) in Safari 3
Thank you for replying, and for new script you did for me. However, this script does work fine in Safari 3 when i dont use the as a CSS selector, I was just wondering why it did not work with in Safari thanks gemmes
[jQuery] Re: data cache and tag attributes
Some downsides to using expandos (arbitrary attribute key/value pairs on DOMElements): 1) possible memory leaks 2) keyname choice is limited because of built in attributes/properties 3) have to be careful about what you stick in there (see 1). Best to stick with simple values, ints and strings jQuery solves these by putting at most 1 expando on each element. The value is an int, so it's safe from memory leaks. The attribute key is prefixed with 'jquery' so there's no naming collision. Then the object store/cache is completely external to the DOMElement itself. It's as easy to use as .attr(); just substitute .data(). - Richard On Wed, Aug 27, 2008 at 11:05 AM, Paul Carey [EMAIL PROTECTED] wrote: Hi I've been setting arbitrary attributes on my html tags, and using jQuery to make AJAX requests based on their values. These has worked well so far as writing out arbitrary attributes from the backend is trivial. But I'm about to start using per element attributes more intensively, and now I'm questioning my approach. I'm aware that jQuery UI makes heavy use of the data cache and I assume it does so with good reason. At what point does it make more sense to use the data cache rather than just set html attributes? I'm thinking when closures or rich JavaScript objects are required? If my needs are met by key / value pairs are there any downsides to arbitrary attributes that I should be aware of? Many thanks Paul
[jQuery] Re: Validate and dynamically added controls
Would you mind updating to validate 1.4? I don't want to debug your app just to discover a bug that was fixed long ago. Jörn On Thu, Aug 28, 2008 at 11:36 AM, Gordon [EMAIL PROTECTED] wrote: I've managed to get an example up for you to look at now, it's at http://cms.merus.co.uk/editsurvey.php.html and the javascript for the editor is at http://cms.merus.co.uk/surveybuilder.js At the moment only Question attempts to attach rules to fields, when a new question is added its Label field gets a {required: true} rule added. This doesn't seem to work, however. The call executes without any errors being thrown, but the validator doesn't seem to acknowledge the rule. The rule is being added at line 349 of the javascript file. On Aug 16, 2:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Well, a testpage would help debugging it a lot. Jörn On Fri, Aug 15, 2008 at 11:03 PM, Gordon [EMAIL PROTECTED] wrote: That's kinda odd, I do do the validate() on the form on document ready, and I'm getting no javascript errors of any kind. The rule being added just isn't executing (just a simple required:true for now while I test it). On Aug 15, 5:37 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: There must be a specific error in your code, as adding new inputs to a form is generally supported, without any further hazzle that what you have in your example. Its important that the form where you add the element has the validation code initialized, but thats about it. Jörn On Fri, Aug 15, 2008 at 5:42 PM, Gordon [EMAIL PROTECTED] wrote: 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 need is a way of adding validation rules along with controls so no matter the configuration of the form when it's submitted the validator can check that it's well formed before sending it to the server side script. I was hoping setting validation up on the form on load and then using rules ('add') on each control as I add it would work but it apparently doesn't For example, after an Add input button is clicked, code like below (heavily simplified for clarity) would be executed: var newControl = $('input type=text name=(unique name generated earlier on goes here) /') surveyForm.append (newControl); newControl.rules ('add', {'require': true}); This doesn't seem to cause any javascript errors, but hitting the submit button doesn't cause the newly added control to be validated. Is there something I need to do other than add a rule? Or can't this be done yet? I seem to remember the above approach worked in 1.3.1 but the other problems with that version means I can't use it with my project.
[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 the index of the current element to the event.data object passed to the event handler perhaps? Anyone got an idea?
[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] How to Create a Model Window in JQUERY Modal Window
Hi All, Can any one tell us about jquery modal window usage I would like to know how to use that Thanks and regards Babu
[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] Re: Validate and dynamically added controls
D'oh! I'm certain I'd already upgraded to 1.4 but it seems that in the course of shuffling files around it got overwritten again with an older version and I failed to notice. Thanks for taking the time to help out though. On Aug 28, 12:53 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Would you mind updating to validate 1.4? I don't want to debug your app just to discover a bug that was fixed long ago. Jörn On Thu, Aug 28, 2008 at 11:36 AM, Gordon [EMAIL PROTECTED] wrote: I've managed to get an example up for you to look at now, it's at http://cms.merus.co.uk/editsurvey.php.htmland the javascript for the editor is athttp://cms.merus.co.uk/surveybuilder.js At the moment only Question attempts to attach rules to fields, when a new question is added its Label field gets a {required: true} rule added. This doesn't seem to work, however. The call executes without any errors being thrown, but the validator doesn't seem to acknowledge the rule. The rule is being added at line 349 of the javascript file. On Aug 16, 2:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Well, a testpage would help debugging it a lot. Jörn On Fri, Aug 15, 2008 at 11:03 PM, Gordon [EMAIL PROTECTED] wrote: That's kinda odd, I do do the validate() on the form on document ready, and I'm getting no javascript errors of any kind. The rule being added just isn't executing (just a simple required:true for now while I test it). On Aug 15, 5:37 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: There must be a specific error in your code, as adding new inputs to a form is generally supported, without any further hazzle that what you have in your example. Its important that the form where you add the element has the validation code initialized, but thats about it. Jörn On Fri, Aug 15, 2008 at 5:42 PM, Gordon [EMAIL PROTECTED] wrote: 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 need is a way of adding validation rules along with controls so no matter the configuration of the form when it's submitted the validator can check that it's well formed before sending it to the server side script. I was hoping setting validation up on the form on load and then using rules ('add') on each control as I add it would work but it apparently doesn't For example, after an Add input button is clicked, code like below (heavily simplified for clarity) would be executed: var newControl = $('input type=text name=(unique name generated earlier on goes here) /') surveyForm.append (newControl); newControl.rules ('add', {'require': true}); This doesn't seem to cause any javascript errors, but hitting the submit button doesn't cause the newly added control to be validated. Is there something I need to do other than add a rule? Or can't this be done yet? I seem to remember the above approach worked in 1.3.1 but the other problems with that version means I can't use it with my project.
[jQuery] Re: How to Create a Model Window in JQUERY Modal Window
Check out the excellent plugin jqModal: http://dev.iceburg.net/jquery/jqModal/ it's simple to use and there's tons of examples
[jQuery] Re: moving Div to a Div
Dear Richard , I think Transfer is good for me . but the sample in UI http://ui.jquery.com/repository/latest/demos/functional/#ui.effects.general it seems not to work on safari 3
[jQuery] Sleep or delay in JQuery
Hello all, I'm new to JQuery and I'm looking for a Sleep or Delay function. I have two animations and I want one to not start until the other has finished. Any Ideas? Thanks in advance
[jQuery] Re: How to Create a Model Window in JQUERY Modal Window
thanks for u r help On Thu, Aug 28, 2008 at 6:26 PM, MorningZ [EMAIL PROTECTED] wrote: Check out the excellent plugin jqModal: http://dev.iceburg.net/jquery/jqModal/ it's simple to use and there's tons of examples -- With Thanks and Regards Babu pca
[jQuery] Re: dumb form button element question
Ok thats what I'm doing now but I was hoping I could simplify my code On Aug 28, 9:21 am, garrett [EMAIL PROTECTED] wrote: Give the buttons a unique ID and get the ID using the attr function On Aug 27, 9:12 pm, Maarten [EMAIL PROTECTED] wrote: 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] [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()+;; }; break; case(radio): if($(this).attr('checked') $(this).val() != '') { args += $(this).attr(name) + = + $ (this).val()+;; }; break; } } ); return args;
[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 to write a 'basket summary' div at the bottom of the page if you've got something in your basket. What with this and lack of opacity I've had to put up the IE=7 http header thingy until they get this stuff sorted out.
[jQuery] Travel a Table filtered by checked Checkboxes
Hi folks, I have a problem, with the following scenario. Given is a Table like the following table thead.../thead tbody tr tdinput type=checkbox/tdtdReferenceNumber/td ...more tds /tr /tbody /table A Submit Button is calling a function that should check the table for checked checkboxes and call a webservice with each reference number. The following JQuery Snippet finds all checked checkboxes, but afterwards I am stucked. $(TableID) .find('td') .find('input:checkbox:checked').each( function(intIndex) { alert(intIndex); } ); I also tried the following, but without luck. $(tableID) .find(td) .filter(input:checkbox:checked) .each( function(intIndex) { alert( $(this).next().text() ); } ); Does anyone has a hint on how to solving that problem? best regards, Gordon
[jQuery] Re: Transfer effect in UI
I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [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] [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 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: File Upload
The ExtJS FileUploadField seems a good solution ... a custom Browse buttom with a read only path field. All customized. Does anyone knows how to turn this into JQuery? I have been reading SWFUpload but I can't want to use Flash. I have also see the FileStyle JQuery Plugin but it only styles the button ... Thank You, Miguel On Aug 28, 4:18 am, rudy ub [EMAIL PROTECTED] wrote: I've seen it on ExtJS FileUploadField example:http://extjs.com/deploy/dev/examples/form/file-upload.html On Thu, Aug 28, 2008 at 8:46 AM, shapper [EMAIL PROTECTED] wrote: Hi, Does anyone knows how to style and input of type file with JQuery? I want to use an image as the button or maybe a simple normal input styled with CSS. I also want to style the input where the path is ... I want it to have a grey background and no border. Any idea of how to accomplish this? Thanks, Miguel
[jQuery] Re: Transfer effect in UI
Dear Karl we need your help... On Aug 28, 4:12 pm, Andy Matthews [EMAIL PROTECTED] wrote: I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [jQuery] Transfer effect in UI Dear folk , I tested the Transfer effect inhttp://ui.jquery.com/repository/latest/demos/functional/#ui.effects.g... on Safari 3 , it doesn't work what is the problem ... I would like to use Transfer Effect Regards Pedram
[jQuery] Re: Transfer effect in UI
Dear Karl we need your help... On Aug 28, 4:12 pm, Andy Matthews [EMAIL PROTECTED] wrote: I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [jQuery] Transfer effect in UI Dear folk , I tested the Transfer effect inhttp://ui.jquery.com/repository/latest/demos/functional/#ui.effects.g... on Safari 3 , it doesn't work what is the problem ... I would like to use Transfer Effect Regards Pedram
[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] Re: select all non-empty inputs
I didn't look through all your code, but I'm pretty sure you can get what you're after just using the .serialize() method. http://docs.jquery.com/Ajax/serialize On Aug 28, 7:42 am, Boersnoes [EMAIL PROTECTED] wrote: 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()+;; }; break; case(radio): if($(this).attr('checked') $(this).val() != '') { args += $(this).attr(name) + = + $ (this).val()+;; }; break; } } ); return args;
[jQuery] Plugin function does not exist.
$.fn.selectMatch = function(x) { for (i=0; ithis[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] UI Tabs not working in IE
I am using UI Tabs in the portfolio section of my site to display the different categories of my work ( http://www.adamditota.com/portfolio www.adamditota.com/portfolio ). It seems to work fine in Firefox but not at all in IE7. I guess to kill two birds with one stone, I am also using the jQuery plugin LavaLamp for my navigation which once again works in Firefox but not IE7. Anyone have any ideas? -- View this message in context: http://www.nabble.com/UI-Tabs-not-working-in-IE-tp19200726s27240p19200726.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: problem using form.js and nice edit together.
Still no result guys :P yea you point is right Mike, NiceEdit doesn't got a good documentation also :P Need to try with some other RTE. Is there any other Rich Text Editors You guys know which can have this functionality I need to implement ? Thanks again... Hasanga On Aug 26, 4:39 pm, Mike Alsup [EMAIL PROTECTED] wrote: well.. no Mike I think you got it wrong... OK I have written the code to explain the above problem and hosted it here...http://www.offthegroundmedia.com/edit/ In this form when I change the ID combo box I retrieve data via ajax (using forms.js for jquery) and fills in to a text box(title) and text area(description). It works fine since I haven't implemented NideEdit (a rich text editor) to the text area. But when I implementNiceEditI need to refresh the page to content fill in to the text area. From a jQuery perspective your is fine. So I still think this is just a matter of learning how NicEdit works. How do you update the contents of the editor programmatically? Take all the ajax, etc out of the equation and start with a blank editor. How do you tell NicEdit to change the contents of the editor to Hello World? I doubt very much that altering the native textarea's value will do the trick. I may be wrong, but I think that's the question you need to answer. Have you tried the NicEdit forums? Anyone else out there familiar with NicEdit? Mike
[jQuery] PNG Opacity Fix for IE6 - Not working!, please help me by tonight before i see my client!
hey all, i need some help fast! This is my site i created ages ago that i should ahve completed about 2 months ago for a client and i have no idea why i havent got off my arse, anywho. i want it uplaoded and finished today, although i just realised the PNG Opacity Fix for ie6 using Jquery dousnt work!! I followed this tutorial; http://docs.jquery.com/Tutorials:PNG_Opacity_Fix_for_IE6 And Rendered it with this site; http://ipinfo.info/netrenderer/index.php?browser=ie6url=http://www.mediasmoke.com/clients/mttcarpentry/ and http://www.browsershots.org and the PNG's still have that really annoying grey border around the edge of the transparent bits! here if my URL to the site, the code is appled in the head section on each page. http://www.mediasmoke.com/clients/mttcarpentry/ Thanks, and please help me fix this asap!
[jQuery] NEWBIE Question re span and form elements
Hi there. I recently discovered jQuery and it appears to be an excellent library. I started looking at libs because I have a specific problem I want to solve easily. I want to an able to show and hide a span on my page. The span may contain some form elements like checkboxes for example. It is possible that a CB could have been selected, and then the event the causes the span to hide comes into play (they answered another question or whatever). If this is the case, I want to hide the span but also uncheck (or whatever) the elements in the span. Is there an easy way to do this with jQuery. I am just starting to read through the docs, and have purchased a couple of books, but of course, I have a timeline to beat. Any suggestions or pointers to docs would be much appreciated. Thanks, Peter
[jQuery] Re: jqModal and div
Anyone? Anyone? Is there anyone that can help me here? On Aug 27, 10:22 am, Tony [EMAIL PROTECTED] wrote: 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] animate in order
I have two items: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}); $('#contactBox').fadeIn(1000, function() { }); How can I make contactBox wait until backDropLeft is finished to run its animate?
[jQuery] Re: Firfox 3 and Firefox 2
Hi, you can google portable firefox or just go to this link: http://portableapps.com/apps/internet/firefox_portable Well, you can't have both FF2 and FF3 running at the same time but you can have them both on your computer at the same time. Hope that helps, Shao On Aug 28, 10:08 am, [EMAIL PROTECTED] wrote: 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] Re: jQuery slideshow
var pos= 0, $imgs; function slide(){ $imgs.eq( pos++ ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind $imgs.eq( pos ).fadeIn(slow, slide ); }); ); // Wait for document ready to start the magic $(function(){ $imgs = $('img.foo'); slide(); }); Note that You should add some kind of namespacing/plugin structure to this (customization is a good idea too). Cheers -- Ariel Flesler http://flesler.blogspot.com On Aug 27, 4:33 pm, admi99 [EMAIL PROTECTED] wrote: 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] Re: Why do a recursion while window unload?
IE isn't the only one leaking memory if this is not performed. This has been greatly improved recently. It will be faster on the next release. Meanwhile you can try using the last revision of jQuery on the svn repository. Cheers -- Ariel Flesler http://flesler.blogspot.com On Aug 27, 6:33 pm, Sutra Zhou [EMAIL PROTECTED] wrote: Another question, in jquery.js(include version 1.2.3, 1.2.6 etc.) why add this code: 1. // Prevent memory leaks in IE 2. // And prevent errors on refresh with events like mouseover in other browsers 3. // Window isn't included so as not to unbind existing unload events 4. jQuery(window).bind(unload, function() { 5. jQuery(*).add(document).unbind(); 6. }); This makes closing/refresh/navigate window more slow, especially the page is large(has many html elements). Why not have a definite object in view? Do necessary unbind operation. To say the least, wrap this code block with: if (ie) { 1. // Prevent memory leaks in IE 2. // And prevent errors on refresh with events like mouseover in other browsers 3. // Window isn't included so as not to unbind existing unload events 4. jQuery(window).bind(unload, function() { 5. jQuery(*).add(document).unbind(); 6. }); }
[jQuery] jquery wallpaper
Several months ago somebody posted a link to some jquery wallpapers that they had created (not cheatsheets, just color background with jquery logo). I lost my copy and for the life of me I can't locate these anymore. Does anybody still have a link for these wallpapers?
[jQuery] Re: Transfer effect in UI
Please note that there is a dedicated mailing list for jQuery UI: http://groups.google.com/group/jquery-ui Thanks for pointing out the issue. It looks like an issue with just that demo page. Transfer itself doesn't have any problems working in Safari. Thanks. - Richard On Thu, Aug 28, 2008 at 9:12 AM, Andy Matthews [EMAIL PROTECTED]wrote: I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [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] Re: Transfer effect in UI
ok thank then I'll use it ... thanks for your Idea On Thu, Aug 28, 2008 at 6:15 PM, Richard D. Worth [EMAIL PROTECTED] wrote: Please note that there is a dedicated mailing list for jQuery UI: http://groups.google.com/group/jquery-ui Thanks for pointing out the issue. It looks like an issue with just that demo page. Transfer itself doesn't have any problems working in Safari. Thanks. - Richard On Thu, Aug 28, 2008 at 9:12 AM, Andy Matthews [EMAIL PROTECTED]wrote: I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [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] Re: Transfer effect in UI
I failed to provide another useful link. If you find an issue with this or other UI plugins (and best if you can include a sample test page to reproduce), feel free to create a ticket here: http://ui.jquery.com/bugs/newticket Discussion before or after ticket creation on the mailing list always welcome. Thanks. - Richard Richard D. Worth http://rdworth.org/ On Thu, Aug 28, 2008 at 10:47 AM, [EMAIL PROTECTED] wrote: ok thank then I'll use it ... thanks for your Idea On Thu, Aug 28, 2008 at 6:15 PM, Richard D. Worth [EMAIL PROTECTED]wrote: Please note that there is a dedicated mailing list for jQuery UI: http://groups.google.com/group/jquery-ui Thanks for pointing out the issue. It looks like an issue with just that demo page. Transfer itself doesn't have any problems working in Safari. Thanks. - Richard On Thu, Aug 28, 2008 at 9:12 AM, Andy Matthews [EMAIL PROTECTED]wrote: I can confirm this. The Transfer effect doesn't work in Safari 3 for the PC. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:41 AM To: jQuery (English) Subject: [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] Re: missing ; before statement
Those are headers. They should be separate from the data. An HTTP download looks like: Header-1: Value Header-2: Value Header-3: Value Content... That is, the first blank line ends the headers. If your server is inserting a blank line before the headers, it would cause the problem you describe. Use the Net panel in Firebug to inspect the headers and data for an Ajax download, and you maybe be able to see what is wrong. -Mike sometime i m getting following lines with my ajax data instead of error HTTP/1.1 200 OK Date: Thu, 28 Aug 2008 11:50:39 GMT Server: Apache/ 2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 X-Powered-By: PHP/5.2.5 Expires: Mon, 26 Jul 1997 05:00:00 GMT Cache-Control: no-cache, must-revalidate Pragma: no-cache Content- Length: 3626 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/html is this server problem or what
[jQuery] Re: Validate and dynamically added controls
Ah, sorry not mentioning that before, but please use the uncompressed version. Jörn On Thu, Aug 28, 2008 at 2:53 PM, Gordon [EMAIL PROTECTED] wrote: D'oh! I'm certain I'd already upgraded to 1.4 but it seems that in the course of shuffling files around it got overwritten again with an older version and I failed to notice. Thanks for taking the time to help out though. On Aug 28, 12:53 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Would you mind updating to validate 1.4? I don't want to debug your app just to discover a bug that was fixed long ago. Jörn On Thu, Aug 28, 2008 at 11:36 AM, Gordon [EMAIL PROTECTED] wrote: I've managed to get an example up for you to look at now, it's at http://cms.merus.co.uk/editsurvey.php.htmland the javascript for the editor is athttp://cms.merus.co.uk/surveybuilder.js At the moment only Question attempts to attach rules to fields, when a new question is added its Label field gets a {required: true} rule added. This doesn't seem to work, however. The call executes without any errors being thrown, but the validator doesn't seem to acknowledge the rule. The rule is being added at line 349 of the javascript file. On Aug 16, 2:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Well, a testpage would help debugging it a lot. Jörn On Fri, Aug 15, 2008 at 11:03 PM, Gordon [EMAIL PROTECTED] wrote: That's kinda odd, I do do the validate() on the form on document ready, and I'm getting no javascript errors of any kind. The rule being added just isn't executing (just a simple required:true for now while I test it). On Aug 15, 5:37 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: There must be a specific error in your code, as adding new inputs to a form is generally supported, without any further hazzle that what you have in your example. Its important that the form where you add the element has the validation code initialized, but thats about it. Jörn On Fri, Aug 15, 2008 at 5:42 PM, Gordon [EMAIL PROTECTED] wrote: 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 need is a way of adding validation rules along with controls so no matter the configuration of the form when it's submitted the validator can check that it's well formed before sending it to the server side script. I was hoping setting validation up on the form on load and then using rules ('add') on each control as I add it would work but it apparently doesn't For example, after an Add input button is clicked, code like below (heavily simplified for clarity) would be executed: var newControl = $('input type=text name=(unique name generated earlier on goes here) /') surveyForm.append (newControl); newControl.rules ('add', {'require': true}); This doesn't seem to cause any javascript errors, but hitting the submit button doesn't cause the newly added control to be validated. Is there something I need to do other than add a rule? Or can't this be done yet? I seem to remember the above approach worked in 1.3.1 but the other problems with that version means I can't use it with my project.
[jQuery] Re: [TreeView] Lazy-load
You can get the latest revision, which includes the enhanced async stuff, here: http://dev.jquery.com/browser/trunk/plugins/treeview/ Jörn On Thu, Aug 28, 2008 at 3:21 PM, debussy007 [EMAIL PROTECTED] wrote: 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 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Change event for hidden form field
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. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg
[jQuery] Re: jQuery slideshow
Thank you :) However it isn't what I need :) At First : shouldn't it be more like that : $imgs.eq( pos ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind else pos++; $imgs.eq( pos ).fadeIn(slow, slide ); }); Secondly, stil there's recursion problem... On 28 Sie, 16:36, Ariel Flesler [EMAIL PROTECTED] wrote: var pos= 0, $imgs; function slide(){ $imgs.eq( pos++ ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind $imgs.eq( pos ).fadeIn(slow, slide ); }); ); // Wait for document ready to start the magic $(function(){ $imgs = $('img.foo'); slide(); }); Note that You should add some kind of namespacing/plugin structure to this (customization is a good idea too). Cheers -- Ariel Fleslerhttp://flesler.blogspot.com On Aug 27, 4:33 pm, admi99 [EMAIL PROTECTED] wrote: 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] Re: Change event for hidden form field
Something I forgot to add. The change event that I bound does fire correctly when I manually change the value of the field (I changed it's type from hidden to text for testing). _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 28, 2008 10:25 AM To: [jQuery] Subject: [jQuery] Change event for hidden form field 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. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com http://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg
[jQuery] Re: animate in order
You'll need to put the second animation in the callback function of the first. $('#backDropLeft') .animate({height:550}, {duration: 750, easing:'easeOutBack'}, function(){ $('#contactBox').fadeIn(1000, function() { }); }); Brian On Aug 28, 9:56 am, Ronn [EMAIL PROTECTED] wrote: I have two items: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}); $('#contactBox').fadeIn(1000, function() { }); How can I make contactBox wait until backDropLeft is finished to run its animate?
[jQuery] Re: jQuery slideshow
No, your code will hide and show back the last item. If I'm wrong, the code I gave you works as expected. -- Ariel Flesler http://flesler.blogspot.com On Aug 28, 12:27 pm, admi99 [EMAIL PROTECTED] wrote: Thank you :) However it isn't what I need :) At First : shouldn't it be more like that : $imgs.eq( pos ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind else pos++; $imgs.eq( pos ).fadeIn(slow, slide ); }); Secondly, stil there's recursion problem... On 28 Sie, 16:36, Ariel Flesler [EMAIL PROTECTED] wrote: var pos= 0, $imgs; function slide(){ $imgs.eq( pos++ ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind $imgs.eq( pos ).fadeIn(slow, slide ); }); ); // Wait for document ready to start the magic $(function(){ $imgs = $('img.foo'); slide(); }); Note that You should add some kind of namespacing/plugin structure to this (customization is a good idea too). Cheers -- Ariel Fleslerhttp://flesler.blogspot.com On Aug 27, 4:33 pm, admi99 [EMAIL PROTECTED] wrote: 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] Re: jQuery slideshow
My point was the recursion :) I know that it iterates wrong. my last post should be : pos++; if( pos == $imgs.length ) pos = 0; // rewind On 28 Sie, 17:52, Ariel Flesler [EMAIL PROTECTED] wrote: No, your code will hide and show back the last item. If I'm wrong, the code I gave you works as expected. -- Ariel Fleslerhttp://flesler.blogspot.com On Aug 28, 12:27 pm, admi99 [EMAIL PROTECTED] wrote: Thank you :) However it isn't what I need :) At First : shouldn't it be more like that : $imgs.eq( pos ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind else pos++; $imgs.eq( pos ).fadeIn(slow, slide ); }); Secondly, stil there's recursion problem... On 28 Sie, 16:36, Ariel Flesler [EMAIL PROTECTED] wrote: var pos= 0, $imgs; function slide(){ $imgs.eq( pos++ ).fadeOut(slow, function(){ if( pos == $imgs.length ) pos = 0; // rewind $imgs.eq( pos ).fadeIn(slow, slide ); }); ); // Wait for document ready to start the magic $(function(){ $imgs = $('img.foo'); slide(); }); Note that You should add some kind of namespacing/plugin structure to this (customization is a good idea too). Cheers -- Ariel Fleslerhttp://flesler.blogspot.com On Aug 27, 4:33 pm, admi99 [EMAIL PROTECTED] wrote: 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] Jquery Tabs inside a Tab
Hi, I am using http://cse-mjmcl.cse.bris.ac.uk/blog/jQueryNestedMenus/nested.html for jquery nested tabs. But for my requirement i need to selected default 1st sub tab when i click on parent tab. $('#ddetail_tabs ul').tabs({ selected: 0}); this works only for the parent tab. not for the subtab
[jQuery] IE7 change event not bubbling
I've got code that works great in FF but only partially in IE7. The problem centers around event bubbling (correct terminology?) and the change event. Essentially, I am binding the change event to a table, and filtering for changes to checkbox and text inputs in the cells. The table contents are dynamic, which is why I bound the event to the table itself and not all the inputs (supposed to be more efficient too, if I understand the technique right). I also have a click event bound to the same table. It works fine in both browsers. Only the change event seems to cause trouble. This code is part of an internal web app I'm developing. Since I can't let people access the app, I've recreated the same issue which (hopefully) should demonstrate the issue clearly in the following files. Sorry, I currently don't have a web host, or I would be posting a link rather than all this text. Thanks to everyone who takes the time to read this. Chad B. index.html: !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 head titleIE 7 Javascript test/title link rel=stylesheet href=test.css type=text/css / script type=text/javascript src=jquery-1.2.6.js/script script type=text/javascript src=test.js/script /head body h2Demonstration of event bubbling/change event bug in IE7/h2 pbWorks in FF and IE7:/b Click the first table cell in each row to make the entire row green (should work in FF and IE7)./p pbWorks in FF and fails in IE7:/b Changes to inputs (checkbox and text) should change the containing cell to orange./p div id=table_actionsa href=#Add a row/a/div table id=example_table tbody tr th/th thCheck/th thText/th /tr tr id=1 td class=row_num1/td tdinput type=checkbox value=checkbox1 name=checkbox1 id=checkbox1 //td tdinput type=text value=some text name=text1 id=text1 / /td /tr /tbody /table /body /html test.css: #example_table { border-collapse: collapse; background-color: #777; border: 2px solid #AAA; width: 250px; margin: 5px 10px 20px; color: white; text-align: center; } td, th { border: 2px solid #AAA; padding: 3px; } td.cell_h { background-color: orange; } tr.row_h { background-color: green; } #table_actions { margin: 20px 10px 5px; width: 250px; text-align: left; } test.js: $(document).ready(function() { $('#example_table').change(function(event) { var tgt = $(event.target); if (tgt.is('input[type=text]')) { tgt.parent().toggleClass('cell_h'); } else if (tgt.is('input[type=checkbox]')) { tgt.parent().toggleClass('cell_h'); } else { alert('You changed something else'); } }); $('#table_actions a').click(function(event) { event.preventDefault(); next_num = $('tr').length; new_row= 'tr id='+next_num+'td class=row_num'+next_num+'/ td'; new_row += 'tdinput type=checkbox value=checkbox'+next_num+' name=checkbox'+next_num+' id=checkbox'+next_num+' //td'; new_row += 'tdinput type=text value=some text name=text'+next_num+' id=text'+next_num+' //td/tr'; $('#example_table tbody').append(new_row); }); $('#example_table').click(function(event) { tgt = $(event.target); if ($(tgt).is('td.row_num')) { tgt.parent().toggleClass('row_h'); } }); });
[jQuery] $ Not defined
I am having trouble with the $ not defined error and after reading Karl's response (http://groups.google.com/group/jquery-en/ browse_thread/thread/17dab2899c5cfc18/7312dc68c84d93af?lnk=gstq=%24+is +not+defined#7312dc68c84d93af) I have assured myself that it is in fact NOT loading my local copy of the jquery file. I have tried placing it in the same directory as the calling file, my js directory, all diff places. I renamed the download file to jquery126.js and did the following... script type=text/javascript src=js/jquery126.js/script script type=text/javascript src=js/global.js/script Oddly enough when using firebug - I can confirm that the jquery file is giving me a 404 - yet the global.js file is being served just fine. They are both located in the same placve, I have confirmed the file spelling etc. I even tried using the Dreamweaver code hints to help me browse for and select the correct file. Yet the only file that will not wok is my jquery file. Any ideas anyone? Thanks, Chris
[jQuery] Re: Doc's site down?
For jQuery reference, I use Visual jQuery almost exclusively, unless using a new plugin: http://remysharp.com/visual-jquery/ Seems to be a better option than the docs site.
[jQuery] replace href url value for anchor tag
this is probably pretty simple but trying to find documentation on how to change the href value on an anchor tag. i've seen docs that let you filter an anchor tag based on class which is prob what i'll do but i need to change the url that it is pointing to href=some/pattern/here to rewrite to ensure proper encoding (for spaces, etc.) and b/c i want to point it somewhere different. this is prob not best approach overall but data is not easy to change for me so i want to change the url. I'll need to do same thing for tags as well (point src to diff location). your help is appreciated. also looking for where documentation specifies what properties can be changed. thanks
[jQuery] Re: New plugin - date picker
Hi Stefan, I was wondering if you could help me with regards to your jQuery DatePicker? Let me just say that this piece of work is fantastic, i've extended it somewhat to ensure my requirements are embedded. I'm having a difficulty with one area. When viewing the DatePicker in IE 7.0 the browser window loses focus and another window pops over it. This only occurs when there is one browser tab open, if there is more than one it works fine, the problem doesn't exist in FireFox. I wondered if you'd come across this problem and if you knew how to fix it? I believe it has something to do with the EYE code as when I remove this it functions fine but the calendar no longer works correctly. If you could provide any guidence or help that would be superb and very much appreciated. I can send you a copy of a zipped up version I have been working if you need to see an example. I've looked at your example and it doesn't appear to happen but then I've stripped my version down to what yours is and it does occur. The problem isn't related to just my machine, it also occurs on other peoples. Thanks in anticipation, Mat On Jul 30, 4:42 pm, Stefan [EMAIL PROTECTED] wrote: 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] Re: Help with jQuery Cycle Plugin Transitions
Hi Mike, Yes, indeed! Test page currently resides at http://preview.tinyurl.com/652c6n Obviously, from there you can see my source, etc. At this point, it does not even fade since I've been trying to figure it all out! Thanks again... -Josh On Aug 27, 1:32 pm, Mike Alsup [EMAIL PROTECTED] wrote: Hi Mike, Thanks for your reply... OK, I now am using jQuery Cycle Plugin with all transitions - uncompressedhttp://www.malsup.com/jquery/cycle/jquery.cycle.all.js?v2.25 and now can't seem to achieve even the fade!? Where in the js file do I define, say, scrollDown? I've tried in the default settings to no avail. When I load the page, no transition happens! The code in my doc head is: script type=text/javascript src=js/jquery.js/script script type=text/javascript src=js/jqueryCycle.js/script Ugghhh! Thanks again for the guidance on this one... Josh, Can you please post a link to the page you're having trouble with or create a bare-bones demo page that shows the problem? Thanks. Mike
[jQuery] Re: problem using form.js and nice edit together.
yea you point is right Mike, NiceEdit doesn't got a good documentation also :P Need to try with some other RTE. Is there any other Rich Text Editors You guys know which can have this functionality I need to implement ? Here's one: http://www.fyneworks.com/jquery/FCKEditor/
[jQuery] Re: Firfox 3 and Firefox 2
Assuming you have neither versions installed: 1) install FF2 - use the custom option to install in a different directory (C:\Program Files\Mozilla Firefox 2) 2) install FF3 - use the custom option to install in a different directory (C:\Program Files\Mozilla Firefox 3) 3) from the command line, run the profile manager to manage profiles: C:\Program Files\Mozilla Firefox 2\firefox.exe -profilemanager 4) create new profiles (firefox2, firefox3) You can also just use the default for either version...it's up to you 5) modify the firefox shortcuts (Right-click Properties Target) to use the new profiles - Firefox 2 Shortcut Target: C:\Program Files\Mozilla Firefox 2\firefox.exe -no-remote -p firefox2 - Firefox 3 Shortcut Target: C:\Program Files\Mozilla Firefox 3\firefox.exe -no-remote -p firefox3 You can use different install paths, profile names, etc...just modify the above to fit your requirements/system. If you already have one version installed, use the profile associated with it, otherwise you might loose your settings. HTH -Eric On Aug 28, 7:12 am, Shao Kang Tat [EMAIL PROTECTED] wrote: Hi, you can google portable firefox or just go to this link: http://portableapps.com/apps/internet/firefox_portable Well, you can't have both FF2 and FF3 running at the same time but you can have them both on your computer at the same time. Hope that helps, Shao On Aug 28, 10:08 am, [EMAIL PROTECTED] wrote: 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] Re: Dan Switzer's Autocomplete plugin - can I do this...
Andy, First I'd recommend updating to latest version that Jörn's been managing. I have no plans on updating my version. I'm using Dan's autocomplete plugin in an app and it's working great. I just have one question. I'm loading in all options (around 5-10) into an array when the page loads. I'd like to trigger the list selection screen when the user clicks into the text field. Is this possible? So if I've got the following in my array: [Accessories,Interior,Maintenance,Parts,Service,Tires,Vehicle Sales] I'd like all of those items to display when the user clicks the text field. Then, as they type, it would filter out other options. Or of course they could select it straight away, or type their own. I thought it would be enough to put a click handler on the input field like so: .click(function(){ showResults(); }); but that doesn't work. Anyone? Dan? I think you might be able to hack it the way you want by changing the line: var prev = ; to: var prev = null; And then you'd need the to set the option minChars to 0. I haven't tested this and don't know what else this might impact. -Dan
[jQuery] Re: Attaching onAfter dynamically
i need something similar to the solution onhttp://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) This is not supported. The before/after callbacks are invoked unconditionally. This is important because the plugin leverages the callback framework as well, so there is often more than one before/ after callback. Mike
[jQuery] Re: Travel a Table filtered by checked Checkboxes
Would you be able to store the Reference Number in the value attribute of the checkbox? That would make things a lot easier. input type='checkbox' name='refNumber' value='ReferenceNumber'/ Then you could do something like this? $(tableID) .find(':input:checkbox:checked') .each(function(){ alert('ref number: ' + $(this).val()); }); Brian On Aug 28, 8:49 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I have a problem, with the following scenario. Given is a Table like the following table thead.../thead tbody tr tdinput type=checkbox/tdtdReferenceNumber/td ...more tds /tr /tbody /table A Submit Button is calling a function that should check the table for checked checkboxes and call a webservice with each reference number. The following JQuery Snippet finds all checked checkboxes, but afterwards I am stucked. $(TableID) .find('td') .find('input:checkbox:checked').each( function(intIndex) { alert(intIndex); } ); I also tried the following, but without luck. $(tableID) .find(td) .filter(input:checkbox:checked) .each( function(intIndex) { alert( $(this).next().text() ); } ); Does anyone has a hint on how to solving that problem? best regards, Gordon
[jQuery] Re: Cycle - goto
i need something similar to the solution onhttp://malsup.com/jquery/cycle/goto.html, but with an addition: i'd like to specify if the scrolling is to be 'forward' or 'backward', so it would be something like: $('#s1').cycle(2, 'forward'); or $('#s1').cycle(2, 'backward'); For example, if there are 4 DIVs and I am on DIV number 2, if I call $('#s1').cycle(3), i want the third DIV to come from the right side; if I call $('#s1').cycle(1), i want the first DIV to come from the left side; Is that possible? I mean, is it possible to specify programatically if the next DIV is comming from the right side or from the left side? Thanks in advance This is not currently supported but I think it would be easy to add. I'll put it on my list for the next release. Mike
[jQuery] Re: Understanding event delegation
No, you don't need to input your large block of code twice, one for each span. Event delegation doesn't care which element is clicked, it just care what element type was clicked. The code I provided above can handle an unlimited amount of span tags that are children of an anchor tag. I'm doing pretty much the exact same thing on one of my projects and the jquery.Listen plugin handles all of the nicely. On Aug 26, 6:23 pm, hubbs [EMAIL PROTECTED] wrote: Bummer that is has to be done this way. If I have a large block of code that is needed for the click event, I would have to put it twice in my code to account for the spans inside of my anchor. Even with doing this, and having more js, is it still a better idea to use event delegation rather than something like livequery, where each element gets an event binded? On Aug 26, 2:01 pm, Brian Schilt [EMAIL PROTECTED] wrote: so when you have an anchor set as block, with a few spans to style text, it is hard to click on the actual anchor to give it the class. Is this normal? That is a normal reaction when using event delegation and its one of the difficulties that Ariel was probably referring to. You'll need to set up your event delegation to account for 1) clicking on the actual anchor and 2) clicking on the child span tag. You'll need to add a condition to your IF statement to account for the span tags...When $target is a span, select its parent anchor element. if ($target.is('.scroll a')) { $(a.selected).removeClass(selected); $(event.target).addClass(selected);} else if ($target.is('span')) { var $anchor = $target.parent('a'); $(a.selected).removeClass(selected); $anchor.addClass(selected); } Brian On Aug 26, 4:22 pm, hubbs [EMAIL PROTECTED] wrote: Hmmm, I take that back. It still seems like the is() is able to select child elements of the anchor, so when you have an anchor set as block, with a few spans to style text, it is hard to click on the actual anchor to give it the class. Is this normal? On Aug 26, 11:37 am, hubbs [EMAIL PROTECTED] wrote: Thank you, that fixed it. Is the limitation of is() a javascript limitation, or a jQuery limitation? Would this be coming in a new version of jQuery? Also, with event delegation, would you recommending using it for all event instances on a page? I have a few places where a single click event is added to an ID, and I figure it is really not necessary to mess with event delegation there. On Aug 26, 11:31 am, Ariel Flesler [EMAIL PROTECTED] wrote: Note that is() doesn't accept complex selectors (yet). The reason of your problems is probably this. Event delegation is surely the best approach, if you can live with its difficulties. -- Ariel Fleslerhttp://flesler.blogspot.com On Aug 26, 2:31 pm, hubbs [EMAIL PROTECTED] wrote: 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) { var $target = $(event.target); if ($target.is('.scroll a')) { $(a.selected).removeClass(selected); $(event.target).addClass(selected); } });
[jQuery] Re: Help with jQuery Cycle Plugin Transitions
Yes, indeed! Test page currently resides athttp://preview.tinyurl.com/652c6n Obviously, from there you can see my source, etc. At this point, it does not even fade since I've been trying to figure it all out! Firebug shows the following message in the console: [cycle] unknown transition: srollDown You have a typo. Try 'scrollDown' with a 'c'. Note that you have this typo in two places: jqueryCycle.js and jqcycle.js Mike
[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=expandablepFirst content showing/pp'; print 'text'; print '/p/div'; ? But, when I try to embed another script/script tag in the 2nd child element, the page finishes loading and then redirects to a white page with only the contents of the 2nd element visible (no theme, or any other content). Ex code: script type=text/javascript $(document).ready(function() { $('div.expandable').summarize({expandText:' Click here for more information...'}); }); /script ?php print 'div class=expandablepFirst content showing/ piframep'; print 'script src=http://promos.npr.org/morning/ morning.promo.js/script'; print '/p/div'; ? I'm wondering whether this might somehow be related to the similar problem that TinyMCE has with this version of jquery (http:// drupal.org/node/235972). Better yet, I'm wondering if anyone can see something that I'm doing wrong? Thanks for your time. -derrick.
[jQuery] Re: Help with jQuery Cycle Plugin Transitions
Firebug shows the following message in the console: [cycle] unknown transition: srollDown You have a typo. Try 'scrollDown' with a 'c'. Note that you have this typo in two places: jqueryCycle.js and jqcycle.js Mike By the way, I should mention that you're really making this hard on yourself by not leveraging tools like FireBug (or IE 8's debugger). With the proper tools, problems like this are very easy to solve.
[jQuery] Re: Summarize Plugin trouble
oops, sorry, ignore the iframe tag... that was an attempted solution... this is the code that isn't working; script type=text/javascript $(document).ready(function() { $('div.expandable').summarize({expandText:' Click here for more information...'}); }); /script ?php print 'div class=expandablepFirst content showing/pp'; print 'script src=http://promos.npr.org/morning/morning.promo.js /script'; print '/p/div'; ? On Thu, Aug 28, 2008 at 12:26 PM, dellis [EMAIL PROTECTED] wrote: 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=expandablepFirst content showing/pp'; print 'text'; print '/p/div'; ? But, when I try to embed another script/script tag in the 2nd child element, the page finishes loading and then redirects to a white page with only the contents of the 2nd element visible (no theme, or any other content). Ex code: script type=text/javascript $(document).ready(function() { $('div.expandable').summarize({expandText:' Click here for more information...'}); }); /script ?php print 'div class=expandablepFirst content showing/ piframep'; print 'script src=http://promos.npr.org/morning/ morning.promo.js/script'; print '/p/div'; ? I'm wondering whether this might somehow be related to the similar problem that TinyMCE has with this version of jquery (http:// drupal.org/node/235972). Better yet, I'm wondering if anyone can see something that I'm doing wrong? Thanks for your time. -derrick.
[jQuery] Re: replace href url value for anchor tag
this is probably pretty simple but trying to find documentation on how to change the href value on an anchor tag. i've seen docs that let you filter an anchor tag based on class which is prob what i'll do but i need to change the url that it is pointing to href=some/pattern/here to rewrite to ensure proper encoding (for spaces, etc.) and b/c i want to point it somewhere different. this is prob not best approach overall but data is not easy to change for me so i want to change the url. I'll need to do same thing for tags as well (point src to diff location). your help is appreciated. also looking for where documentation specifies what properties can be changed. This is a job for attr: http://docs.jquery.com/Attributes For example: $('a').attr('href','http://malsup.com/jquery'); $('img').attr('src','myimage.jpg');
[jQuery] Re: $ Not defined
I am having trouble with the $ not defined error and after reading Karl's response (http://groups.google.com/group/jquery-en/ browse_thread/thread/17dab2899c5cfc18/7312dc68c84d93af?lnk=gstq=%24+is +not+defined#7312dc68c84d93af) I have assured myself that it is in fact NOT loading my local copy of the jquery file. I have tried placing it in the same directory as the calling file, my js directory, all diff places. I renamed the download file to jquery126.js and did the following... script type=text/javascript src=js/jquery126.js/script script type=text/javascript src=js/global.js/script Oddly enough when using firebug - I can confirm that the jquery file is giving me a 404 - yet the global.js file is being served just fine. They are both located in the same placve, I have confirmed the file spelling etc. I even tried using the Dreamweaver code hints to help me browse for and select the correct file. Yet the only file that will not wok is my jquery file. Any ideas anyone? What type of webserver are you using? Sometimes webapps need to be bounced when deployed into app servers like WebSphere in order to redeploy static resources. Mike
[jQuery] Re: animate in order
Brian Thanks for the response. Unfortunately it still is not working. I tried adding an alert to backDropLeft's callback function like so: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}, function(){ alert(hello); }); and it didn't alert when I ran the page. Do you have any other ideas? Thanks, Ronn On Thu, Aug 28, 2008 at 11:50 AM, Brian Schilt [EMAIL PROTECTED] wrote: You'll need to put the second animation in the callback function of the first. $('#backDropLeft') .animate({height:550}, {duration: 750, easing:'easeOutBack'}, function(){ $('#contactBox').fadeIn(1000, function() { }); }); Brian On Aug 28, 9:56 am, Ronn [EMAIL PROTECTED] wrote: I have two items: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}); $('#contactBox').fadeIn(1000, function() { }); How can I make contactBox wait until backDropLeft is finished to run its animate?
[jQuery] Re: Change event for hidden form field
I would recommend replacing the pop up window with an in-page modal window (http://ui.jquery.com/repository/latest/demos/functional/ #ui.dialog). The modal windows these days are advanced enough to function much like a pop up window with draggable, resizable, scolling and whatnot. This would be easy to do if you were to use a modal window because once hidden form field is populated you can us jQuery's event trigger method (http://docs.jquery.com/Events/trigger#typedata) to make it happen. If you absolutely need to use the pop up window then have the new window call a function in the parent window. This function can execute a trigger. //this function is in the parent window. function triggerHiddenFormField() { $('$hiddenFormField').trigger('change'); } //pop up window calls the the parent window's function window.opener.triggerHiddenFormField(); brian On Aug 28, 11:40 am, Andy Matthews [EMAIL PROTECTED] wrote: Something I forgot to add. The change event that I bound does fire correctly when I manually change the value of the field (I changed it's type from hidden to text for testing). _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 28, 2008 10:25 AM To: [jQuery] Subject: [jQuery] Change event for hidden form field 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. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249www.dealerskins.comhttp://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg 17KViewDownload
[jQuery] Re: Change event for hidden form field
Brian... The page in question has image upload built into the list of images to be selected from. So that wouldn't work. However, the function call that you suggested is what I ended up using. Thanks for the feedback...appreciated. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Schilt Sent: Thursday, August 28, 2008 11:57 AM To: jQuery (English) Subject: [jQuery] Re: Change event for hidden form field I would recommend replacing the pop up window with an in-page modal window (http://ui.jquery.com/repository/latest/demos/functional/ #ui.dialog). The modal windows these days are advanced enough to function much like a pop up window with draggable, resizable, scolling and whatnot. This would be easy to do if you were to use a modal window because once hidden form field is populated you can us jQuery's event trigger method (http://docs.jquery.com/Events/trigger#typedata) to make it happen. If you absolutely need to use the pop up window then have the new window call a function in the parent window. This function can execute a trigger. //this function is in the parent window. function triggerHiddenFormField() { $('$hiddenFormField').trigger('change'); } //pop up window calls the the parent window's function window.opener.triggerHiddenFormField(); brian On Aug 28, 11:40 am, Andy Matthews [EMAIL PROTECTED] wrote: Something I forgot to add. The change event that I bound does fire correctly when I manually change the value of the field (I changed it's type from hidden to text for testing). _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 28, 2008 10:25 AM To: [jQuery] Subject: [jQuery] Change event for hidden form field 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. Am I doing something wrong, or am I misunderstanding what I need to do? Or is there another way to do this, one that's better? In essence, this is what I'm doing. 1) Open a new window 2) In this new window, click a link which corresponds to an image 3) In the new window, get the filename of the selected image; pass it back to a specified hidden input field in the parent window. 4) When the hidden input field's value changes, fire an event/function which changes the src attribute of an img tag to match the value of the hidden form field. Any ideas? The value of the input field updates properly, but it just doesn't fire the change handler. Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249www.dealerskins.comhttp://www.dealerskins.com/ Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] 2008 Email NADA.jpg 17KViewDownload
[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?
[jQuery] Re: animate in order
Ok, our syntax was a bit jacked up. I created a test page, this will work: $('#backDropLeft').animate({height:550},750,'easeOutBack', function(){ $('#contactBox').fadeIn(1000); }); Make sure that you have jquery-ui loaded up as well otherwise easing won't work. Brian On Aug 28, 12:50 pm, Ronn Ross [EMAIL PROTECTED] wrote: Brian Thanks for the response. Unfortunately it still is not working. I tried adding an alert to backDropLeft's callback function like so: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}, function(){ alert(hello); }); and it didn't alert when I ran the page. Do you have any other ideas? Thanks, Ronn On Thu, Aug 28, 2008 at 11:50 AM, Brian Schilt [EMAIL PROTECTED] wrote: You'll need to put the second animation in the callback function of the first. $('#backDropLeft') .animate({height:550}, {duration: 750, easing:'easeOutBack'}, function(){ $('#contactBox').fadeIn(1000, function() { }); }); Brian On Aug 28, 9:56 am, Ronn [EMAIL PROTECTED] wrote: I have two items: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}); $('#contactBox').fadeIn(1000, function() { }); How can I make contactBox wait until backDropLeft is finished to run its animate?
[jQuery] Re: animate in order
Brian, Thanks that worked great. I'm still new to JQuery, but community has been a great help. Thanks again for the help, Ronn On Thu, Aug 28, 2008 at 1:31 PM, Brian Schilt [EMAIL PROTECTED] wrote: Ok, our syntax was a bit jacked up. I created a test page, this will work: $('#backDropLeft').animate({height:550},750,'easeOutBack', function(){ $('#contactBox').fadeIn(1000); }); Make sure that you have jquery-ui loaded up as well otherwise easing won't work. Brian On Aug 28, 12:50 pm, Ronn Ross [EMAIL PROTECTED] wrote: Brian Thanks for the response. Unfortunately it still is not working. I tried adding an alert to backDropLeft's callback function like so: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}, function(){ alert(hello); }); and it didn't alert when I ran the page. Do you have any other ideas? Thanks, Ronn On Thu, Aug 28, 2008 at 11:50 AM, Brian Schilt [EMAIL PROTECTED] wrote: You'll need to put the second animation in the callback function of the first. $('#backDropLeft') .animate({height:550}, {duration: 750, easing:'easeOutBack'}, function(){ $('#contactBox').fadeIn(1000, function() { }); }); Brian On Aug 28, 9:56 am, Ronn [EMAIL PROTECTED] wrote: I have two items: $('#backDropLeft').animate({height:550}, {duration: 750, easing: 'easeOutBack'}); $('#contactBox').fadeIn(1000, function() { }); How can I make contactBox wait until backDropLeft is finished to run its animate?
[jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this...
Dan... I think it might actually work without those changes you suggested. Problem is that at the point I'm calling the plugin, it doesn't recognize showResults as a method: $(#category).autocompleteArray( // this array comes from the coupons_edit.cfm file catArray, { delay:10, minChars:0, matchSubset:1, onItemSelect:selectItem, onFindValue:findValue, autoFill:true, maxItemsToShow:10 } ).click(function(){ showResults(); }); When I click the input field, I get an error: showResults is not defined http://testlogin.dealerskins.loc/admin/coupons/js/coupon_edit.js Line 130 Any ideas? Also, is Jörn's plugin listed on the jQuery site? andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Thursday, August 28, 2008 11:17 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this... Andy, First I'd recommend updating to latest version that Jörn's been managing. I have no plans on updating my version. I'm using Dan's autocomplete plugin in an app and it's working great. I just have one question. I'm loading in all options (around 5-10) into an array when the page loads. I'd like to trigger the list selection screen when the user clicks into the text field. Is this possible? So if I've got the following in my array: [Accessories,Interior,Maintenance,Parts,Service,Tires,Vehi cle Sales] I'd like all of those items to display when the user clicks the text field. Then, as they type, it would filter out other options. Or of course they could select it straight away, or type their own. I thought it would be enough to put a click handler on the input field like so: .click(function(){ showResults(); }); but that doesn't work. Anyone? Dan? I think you might be able to hack it the way you want by changing the line: var prev = ; to: var prev = null; And then you'd need the to set the option minChars to 0. I haven't tested this and don't know what else this might impact. -Dan
[jQuery] Re: Doc's site down?
We've been working with the guys at Media Temple - they're going to be breaking us off into multiple servers. Right now the docs site (for example) is getting the equivalent of about 3-4 Slashdot/Digg effects per day so we have to boost up the resources that we have. --John On Thu, Aug 28, 2008 at 3:22 PM, Chris Jordan [EMAIL PROTECTED]wrote: No offense to Remy, but I just don't like the way the Visual jQuery docs are laid out. I *really* like the way the official docs are laid out on docs.jQuery.com. If a copy of the docs in that exact format could be hosted somewhere else as an alternative to docs.jQuery.com, then I'd be happy with that. Just my two-cents. Having docs down (they appear to be down right now 2:22pm cst) is very frustrating, but I'm happy to know that they're working to resolve the issue. Any kind of update on the problem, Rey? Chris On Thu, Aug 28, 2008 at 10:48 AM, Sam [EMAIL PROTECTED] wrote: For jQuery reference, I use Visual jQuery almost exclusively, unless using a new plugin: http://remysharp.com/visual-jquery/ Seems to be a better option than the docs site. -- http://cjordan.us
[jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this...
Andy, I think it might actually work without those changes you suggested. Problem is that at the point I'm calling the plugin, it doesn't recognize showResults as a method: That's a private function that only the plug-in can access. -Dan
[jQuery] Re: Doc's site down?
I googled jquery chm I got this link (I know some may view chm's as pesky [others may not be able to use them]) http://charupload.wordpress.com/2008/03/31/chm-version-of-jquery-api-browser/ if its up to date it may well be helpful in the interim - I think it was last updated March 31, 2008 - S 2008/8/28 Chris Jordan [EMAIL PROTECTED] No offense to Remy, but I just don't like the way the Visual jQuery docs are laid out. I *really* like the way the official docs are laid out on docs.jQuery.com. If a copy of the docs in that exact format could be hosted somewhere else as an alternative to docs.jQuery.com, then I'd be happy with that. Just my two-cents. Having docs down (they appear to be down right now 2:22pm cst) is very frustrating, but I'm happy to know that they're working to resolve the issue. Any kind of update on the problem, Rey? Chris On Thu, Aug 28, 2008 at 10:48 AM, Sam [EMAIL PROTECTED] wrote: For jQuery reference, I use Visual jQuery almost exclusively, unless using a new plugin: http://remysharp.com/visual-jquery/ Seems to be a better option than the docs site. -- http://cjordan.us
[jQuery] Re: Doc's site down?
That's good news, John. All this reminds me that I've not donated to jQuery in a several months. I somehow feel like I need (and want) to send in more support. I don't know if the hosting for the jQuery site (servers, bandwidth, administration, maintenance, etc.) is being donated or what, but a little money couldn't hurt, right? Thanks for all you (and the rest of the jQuery team) do, John! :o) Chris On Thu, Aug 28, 2008 at 2:26 PM, John Resig [EMAIL PROTECTED] wrote: We've been working with the guys at Media Temple - they're going to be breaking us off into multiple servers. Right now the docs site (for example) is getting the equivalent of about 3-4 Slashdot/Digg effects per day so we have to boost up the resources that we have. --John On Thu, Aug 28, 2008 at 3:22 PM, Chris Jordan [EMAIL PROTECTED]wrote: No offense to Remy, but I just don't like the way the Visual jQuery docs are laid out. I *really* like the way the official docs are laid out on docs.jQuery.com. If a copy of the docs in that exact format could be hosted somewhere else as an alternative to docs.jQuery.com, then I'd be happy with that. Just my two-cents. Having docs down (they appear to be down right now 2:22pm cst) is very frustrating, but I'm happy to know that they're working to resolve the issue. Any kind of update on the problem, Rey? Chris On Thu, Aug 28, 2008 at 10:48 AM, Sam [EMAIL PROTECTED] wrote: For jQuery reference, I use Visual jQuery almost exclusively, unless using a new plugin: http://remysharp.com/visual-jquery/ Seems to be a better option than the docs site. -- http://cjordan.us -- http://cjordan.us
[jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this...
There we go. It's no big deal. Just thought it would be a nice addition. Thanks for checking it out Dan. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Thursday, August 28, 2008 2:37 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Dan Switzer's Autocomplete plugin - can I do this... Andy, I think it might actually work without those changes you suggested. Problem is that at the point I'm calling the plugin, it doesn't recognize showResults as a method: That's a private function that only the plug-in can access. -Dan
[jQuery] problem with ajax request: request is not being sent
Hi, I am using jQuery and Web2Messenger to create a live support script, since this is my first attempt at using jQuery i am not surprised i need help. I got as far as sending the request but using tamperdata (firefox plugin) i checked if the request was going through and it wasnt. [code] $(document).ready(function(){ $(#submit).click(function(){ //Validation if(hasError == false) { $(this).hide(); $(#form div.button).append('img src=/images/bullet_16.jpg alt=Loading id=loading /'); var post = $(form).serialize(); $.ajax( { url: http://www.web2messenger.com/WebSiNcH;, data: post, success: function(data){ alert( Done! ); } } ); } return false; }); }); [/code] This isnt the first time i have worked with javascript, but i havent done much if you need to see the script in action just go here http://websinch.com/support/
[jQuery] Order load
Hi! how do I do to specify the order to load every component in the html file? I need to avoid that an component overlaps another component
[jQuery] Wrap tagless text fragments?
I develop and host wikis where users enter free-form text, and my server-side parsers create WISIWYG HTML from this. Of course, users can, and do, submit almost anything, and on the server-side I do a pretty good job of marking it up properly. But addressing edge-cases makes the server-side parsing increasingly heavy. One such edge case is islands of text that are not in any tag other than the global containing DIV. Like this: div class=container h3I am text within a tag/h3 I am a text island child of the container div wrapper. --- My edge case pI am also text within a tag/p /div QUESTION: Using jQuery, how would you select orphan text inside a DIV in order to $.wrap() it, say, in a p tag? I'm thinking I could ask the client browsers to address some of these edge-cases for me. Ideas? Something like $ (.container).textFragmentsNotInsideAnyOtherTag() **--** Steve
[jQuery] Re: replace href url value for anchor tag
cool thanks. I'm having trouble applying it... I have an anchor tag like a href=File Library/IDClickity/a and i need to build an url like somewhere/?library=File +Librarycomponent=id my approach below is only happy when pattern exists (pages with normal links give js error). plus this can't be best way. $([EMAIL PROTECTED]).addClass(file); var library = $(a.file).attr('href').split(/) [0].replace( , +); var id = $(a.file).attr('href').split(/) [1]; $(a.file).attr('href','.http://somewhere.com//?library='+library +'component='+id); On Aug 28, 12:43 pm, Mike Alsup [EMAIL PROTECTED] wrote: this is probably pretty simple but trying to find documentation on how to change the href value on an anchor tag. i've seen docs that let you filter an anchor tag based on class which is prob what i'll do but i need to change the url that it is pointing to href=some/pattern/here to rewrite to ensure proper encoding (for spaces, etc.) and b/c i want to point it somewhere different. this is prob not best approach overall but data is not easy to change for me so i want to change the url. I'll need to do same thing for tags as well (point src to diff location). your help is appreciated. also looking for where documentation specifies what properties can be changed. This is a job for attr: http://docs.jquery.com/Attributes For example: $('a').attr('href','http://malsup.com/jquery'); $('img').attr('src','myimage.jpg');