[jQuery] Re: Enable a disabled checkbox after the user has completely scrolled down to the bottom of a textarea
Noone?
[jQuery] Autocomplete plugin - customization
Hi I'm trying to make a custom hack to the autocomplete plugin. I want it so that when you select a suggestion I can separate the data in that suggestion and insert parts of it into four different elements. I'll use split to get the data into an array and then use the Val function to set the values of the elements, but what is the easiest way to customize theplugon like this? Can I do this wihout editing the plugn itself?
[jQuery] Re: Autocomplete plugin - customization
Hi, Which autocomplete plugin are you using ? Thanks Regards, Dhruva Sagar. Mike Ditka http://www.brainyquote.com/quotes/authors/m/mike_ditka.html - If God had wanted man to play soccer, he wouldn't have given us arms. On Mon, Sep 14, 2009 at 1:57 PM, Althalos g...@ekdahlproduction.com wrote: Hi I'm trying to make a custom hack to the autocomplete plugin. I want it so that when you select a suggestion I can separate the data in that suggestion and insert parts of it into four different elements. I'll use split to get the data into an array and then use the Val function to set the values of the elements, but what is the easiest way to customize theplugon like this? Can I do this wihout editing the plugn itself?
[jQuery] asynchronous validation + BabySteps
Hi, I am struggling a bit with this. I am using the 'jQuery BlockUI Plugin' and the 'BabySteps' plugin (http://blog.vokle.com/index.php/ 2008/08/22/babysteps/) where I go from step to step if the previous step validates ok. I have (simplified) code like this: step1.bindStep(step2, { nextValidator: step1_validator, transition: function(currStep, nextStep) { currStep.slideUp(); nextStep.slideDown (); } }); function step1_validator() { $.ajax({ url: ../a/b, type: POST, dataType: text, data: { }, async: true, error: function(XMLHttpRequest, textStatus, errorThrown) { showErrorMessage(Server error + textStatus + + errorThrown); }, beforeSend: function(data) { $.blockUI({ message: 'Please wait ...' }); }, success: function(data) { data = JSON.parse(data); $.unblockUI(); if( !(data.message==) ) { showErrorMessage(data.message); return false; } else { return true; } } }); } The step1_validator should return true or false depending on whether the validation is ok of not. I have to use server side validation and make an asynchronous request. Ideally I would like my 'mother function' (step1_validator) to wait for the asynchronous request to finish and return true or false depending on 'if( ! (data.message==) )'. I hope this makes sense. I can set async: to false but then $.blockUI({ message: 'Please wait ...' }); dose not work anymore. Looking forward to hearing from you. Best wishes, Christian
[jQuery] trim string
Hi, I have an array like this cat=(com12, com1, cop233, com1.1, sap-12-1) I want to take out all the numbers and . and - signs the desire result is cat=(com, com, cop, sap) how can i do that please ?
[jQuery] Flipv Vertical Text and extra space
Hi all I'm currently using the Jquery Flipv plugin, which works well. The only problem is, some words have extra padding at the end, depending on how many characters. http://www.openstudio.fr/jQuery-flipv.html?lang=en I'm not sure why this is, but it seems that the conversion to vertical text creates some extra spacing on certain browsers. Can anyone tell me why this is? I'm trying to get advice through the site, but it's all in French and I can't understand it! Thanks for any help
[jQuery] Jquery Starter - Need help
Hello, I have just started jquery and stuck in some basic. Before telling the problem, here are the 3 simple files that am working with. === test.php === !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / script type=text/javascript src=js/jquery-1.3.2.min.js/script script type=text/javascript src=js/test.js/script titleTest/title /head body div align=center id=megadiv br /nbsp;br / form id=testform action= method=post name=testform !-- - -- div id=testdiv style=border:1px solid #99;width: 240px;height:320px;/div br / input id=show name=show type=button value=show / !-- - -- /form /div /body /html == test2.php === ?php echo This is inside test2.php.; echo br /Loaded at .time(); echo 'br /input name=loadagain type=button value=Load Again / '; ? test.js $(document).ready(function(){ $('#show').click(function(){ var jqdiv1 = $(#testdiv); $.ajax({ type: POST, url: test2.php, data: , async:false, success: function(msg){ jqdiv1.html(msg); }, error:function(xhr,err,e){ alert( Error: + err ); }, complete: function(data){ //jqdiv1.append(done+data.responseText); } }); return false; }); $('#loadagain').click(function(){ var jqdiv1 = $(#testdiv); $.ajax({ type: POST, url: test2.php, data: , async:false, success: function(msg){ jqdiv1.html(msg); }, error:function(xhr,err,e){ alert( Error: + err ); }, complete: function(data){ //jqdiv1.append(done+data.responseText); } }); return false; }); }); Now the problem. If i open the test.php page and click the show button then it is showing the test2.php page inside the testdiv correctly. But now, after loading if I click the loadagain button (which is in test2.php and loaded inside testdiv) to load the page again then its not working. Can anyone tell me whats i am doing wrong? Any help will be greatly appreciated. Thanks.
[jQuery] Re: trim string
Try object.substring('.',' '); On Mon, Sep 14, 2009 at 3:40 PM, runrunforest craigco...@gmail.com wrote: Hi, I have an array like this cat=(com12, com1, cop233, com1.1, sap-12-1) I want to take out all the numbers and . and - signs the desire result is cat=(com, com, cop, sap) how can i do that please ? -- Regard Mohammad.Tareque
[jQuery] Re: Jquery gradient and tabs
Could you provide a link? On Sep 14, 3:38 am, Anush Shetty anushshe...@gmail.com wrote: When I try using jquery gradient plugin with tabs, I see that the tabs get disabled. Does anybody here know the reason behind it ? -- Anush
[jQuery] jquery question on slideUp fadeIn and show
Hi All, jquery noob question here. I've got a php script that runs a few price checker kiosks out on the sales floor at work and I've got a p element that I can get to slide up when a product is scanned and slide back down after a 5 second pause with: $(function() { $(p).slideUp(slow); setTimeout(function(){ $(p).slideDown(slow); }, 5000); }); but when I change the slideUp and slideDown to fadeIn and fadeOut I'm not getting the element to fade in or out. Instead the element shows up on the screen then after 5 seconds the element appears in the position where it ends up after a slideUp. Similarly if I change the slideUp and slideDown to 'show' and 'hide' the element again shows up in the spot that it starts the slideUp from then slides up after 5 seconds. Any thoughts on what I'm doing wrong? Thanks in advance.
[jQuery] Re: Enable a disabled checkbox after the user has completely scrolled down to the bottom of a textarea
take a look at this, which works in your example... script type=text/javascript$('#licenseTerms').scroll(function (){ var a = $(this).scrollTop() / 12.5; var b = $('#licenseTerms').height(); if ( a = b ) { alert(a + , + b); } })/script the problem is that scrollTop() isn't returning the value you expect. On Sep 14, 8:48 am, Thorsten Panknin thorstenpank...@googlemail.com wrote: Noone?
[jQuery] Re: Enable a disabled checkbox after the user has completely scrolled down to the bottom of a textarea
at least it would, if it wasn't for the typo in the closing /script tag... On Sep 14, 12:20 pm, ryan.j ryan.joyce...@googlemail.com wrote: take a look at this, which works in your example... script type=text/javascript$('#licenseTerms').scroll(function (){ var a = $(this).scrollTop() / 12.5; var b = $('#licenseTerms').height(); if ( a = b ) { alert(a + , + b); } })/script the problem is that scrollTop() isn't returning the value you expect. On Sep 14, 8:48 am, Thorsten Panknin thorstenpank...@googlemail.com wrote: Noone?
[jQuery] Re: jquery question on slideUp fadeIn and show
have you tried to use a callback instead of the setTimeout? On Sep 14, 11:37 am, kev. yu210...@gmail.com wrote: Hi All, jquery noob question here. I've got a php script that runs a few price checker kiosks out on the sales floor at work and I've got a p element that I can get to slide up when a product is scanned and slide back down after a 5 second pause with: $(function() { $(p).slideUp(slow); setTimeout(function(){ $(p).slideDown(slow); }, 5000); }); but when I change the slideUp and slideDown to fadeIn and fadeOut I'm not getting the element to fade in or out. Instead the element shows up on the screen then after 5 seconds the element appears in the position where it ends up after a slideUp. Similarly if I change the slideUp and slideDown to 'show' and 'hide' the element again shows up in the spot that it starts the slideUp from then slides up after 5 seconds. Any thoughts on what I'm doing wrong? Thanks in advance.
[jQuery] Re: event coordination problem
Ahh. The problem is that there is NO relation between the two fields: they're just DOM elements like divs, paragraphs, and iframes. The blur event of some textbox is _totally_ unrelated to a click event of some other button. If you want to enforce some rules between the two you'll have to code it yourself - the usual way is to check each individual field on blur and when you click the button, re-check all validation rules. There are also heaps of validation plugins in the jQuery plugin repository you might like to look at to simplify validation handling. On Sep 14, 12:28 pm, Rick Faircloth r...@whitestonemedia.com wrote: if you put the focus in the textbox (#id1) then click the button (#id2) both events get fired Jim... Preventing this occurrence is what I was talking about. What I do is keep the submit button disabled until all required fields have been validated on blur. That way you can't have a field that hasn't been validated and have the submit button fire, too. The user has to blur out of the field to achieve validation and enabling of the submit button. Am I misunderstanding? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mr Speaker Sent: Sunday, September 13, 2009 10:07 PM To: jQuery (English) Subject: [jQuery] Re: event coordination problem I pasted your code into a new HTML doc and it ran as expected: if you put the focus in the textbox (#id1) then click the button (#id2) both events get fired (blur event fires first, click event fires second). Is there anything else in your page? Are you getting any JS errors? On Sep 13, 4:27 am, jhm jmay...@gmail.com wrote: Not sure how this helps, and in fact I'm pretty much already doing that. The problem is that if the focus is in the field, when the button is clicked I get the blur event only and not the click event on the button. If you try the code in the OP, you'll see this happening. Remember to click into the text box before clicking on the button. I need the click event for sure. I could live without the blur event in this situation, but I'd also like to understand the dynamics of what is happening for the future. Jim On Sep 12, 10:39 am, Rick Faircloth r...@whitestonemedia.com wrote: How about setting the field to invalid to start with and force the user to blur the field for a validation routine to declare it valid. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of jhm Sent: Saturday, September 12, 2009 1:04 PM To: jQuery (English) Subject: [jQuery] event coordination problem Hi- In a form, I'm trying to validate a field when they move off it. But this causes a problem when the field has the focus and they click a button to process the form. In this case, only the field's blur event (or change event) gets fired and nothing for the button click event. Seems like a reasonable thing to want to do, so I figure I'm missing something in they way I've coded this. Any suggestions? Here's the very simple code that exhibits the behavior: head script type=text/javascript src=./js/jquery.js/script script type=text/javascript $(document).ready( function() { $('#id1').blur( function() { alert('blur in id1'); }); $('#id2').click( function() { alert('click in id2'); }); }); /script /head body /body input type=text value=Sample Text name=id1 id=id1 / input type=button name=Finish value=Finish id=id2 / /html
[jQuery] Re: (validate) dash/hyphen in radio id problem
I've tried using the quotes on names that don't have a dash in it and this works, but it won't work with the ones that do contain a dash (-) (they are radio buttons) Is this really supposed to work ? Any clue would be appreciated On 11 sep, 16:03, mattso matthieu.larc...@gmail.com wrote: Thanks for your reply, Jörn. I've tried : rules: { genre-f: genreCheck, genre-m: genreCheck } and : rules: { genre-f: { genreCheck: true }, genre-m: { genreCheck: true } } with : $.validator.addMethod('genreCheck', function (value) { alert('called'); if( $(#genre-f).is(:checked) || $(#genre-m).is(:checked) ){ return true; }else{ return false; } }, Please select a genre.); but I don't get any error message and the alert in the genreCheck function shows it's not even called. Any idea why ? On 11 sep, 15:40, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Seehttp://docs.jquery.com/Plugins/Validation/Reference#Fields_with_compl... Jörn On Fri, Sep 11, 2009 at 2:26 PM, mattso matthieu.larc...@gmail.com wrote: Hi, I'm using the bassistance.de Validation Plugin for jQuery and I have the following problem : When using a dash(-) separated id for genres (i.e. genre-f / genre-m), I get the following js error : missing : after property id with the following code: rules: { genre-f: { required: #genre-m }, genre-m: { required: function() { return $(#genre-f).is(:checked); } }, It seems that the js (json?) doesn't allow the use of a - inside a variable name. Unfortunately, I can't change the id names, as they are being generated by Zend Framework which doesn't allow to replace it with another character. Anybody would know a way around this ? It seems to me that in the case of multi-options inputs, the script should focus on the name instead of the id... Any clue would be appreciated.
[jQuery] Removal of element before body
Hi, How can I remove an element before the body of the document, the long and the short of it is that a script I use places a br statement (amongst other things) dynamically into my web pages and based upon which browser I use, sometimes it places it inside the head and sometimes places it before the head and in some browsers not at all. I know it shouldn't, but it does. So basically, is there a way of removing the br statement if it exists before the body element?
[jQuery] ajaxForm - upload issue
Hello everybody! I've recently stumbled upon a very strange issue and it consists of the following: I have a form that I submit using the ajaxForm plugin. I have 2 file fields: thumb and .swf The iframe option is set to true and the form uploads ok the images but does nothing with the .swf file and I have no idea why is this happening Is there some filesize limitation to the plugin or something of this sort? Cheers
[jQuery] Easy show()/hide() Question
I am missing something fundamental and am sure that someone can point me in the right direction. I have a list like so: li id=GalleryMenua href=../Gallery/Default.htmDD/a ul class=DoNotDisplay lia href=../Gallery/Santuary.htmSantuary/a/li lia href=../Gallery/Stream.htmStream/a/li lia href=../Gallery/Winter.htmWinter/a/li /ul /li I have styled it so that the list items float. The class DoNotDisplay hides the unordered list. When the mouse hovers over GalleryMenu then jQuery removes the DoNotDisplay class so that the unordered list is displayed, moving off GalleryMenu hides the list. This works fine and the code is: $(document).ready( function() { $('li#GalleryMenu').add('li#PoemMenu').hover( function() { $(this).children('ul').removeClass('DoNotDisplay'); }, function() { $(this).children('ul').addClass('DoNotDisplay'); } ); } ); I would like the unordered list to slide open, so I changed the code to: $(document).ready( function() { $('li#GalleryMenu').add('li#PoemMenu').hover( function() { $(this).children('ul').show('fast'); console.log('Open list'); }, function() { $(this).children('ul').hide('fast'); console.log('Close list'); } ); } ); The list opens properly, but does not close when I move the mouse from the list. When looking at this in Firebug I see that 'hide' is firing, but for some reason does not close the list. If I unfloat the list then the code works just fine. What am I missing? I'm sure that it is staring me in the face, but I am just not seeing it. The full code can be found at http://glsmyth.com/Sedwick/Templates/ Thanks for looking. Cheers - george
[jQuery] Re: ajaxForm - upload issue
I have a form that I submit using the ajaxForm plugin. I have 2 file fields: thumb and .swf The iframe option is set to true and the form uploads ok the images but does nothing with the .swf file and I have no idea why is this happening Is there some filesize limitation to the plugin or something of this sort? No, the plugin has no limitations like that, but your server may.
[jQuery] Re: Autocomplete plugin - customization
if i understand you correctly, using the result trigger (google for it) may do the whole job. On Mon, Sep 14, 2009 at 11:27, Althalos g...@ekdahlproduction.com wrote: Hi I'm trying to make a custom hack to the autocomplete plugin. I want it so that when you select a suggestion I can separate the data in that suggestion and insert parts of it into four different elements. I'll use split to get the data into an array and then use the Val function to set the values of the elements, but what is the easiest way to customize theplugon like this? Can I do this wihout editing the plugn itself? -- alex smime.p7s Description: S/MIME Cryptographic Signature
[jQuery] Re: trim string
It would be best to use a regular expression. On Sep 14, 5:37 am, Mohd.Tareq tareq.m...@gmail.com wrote: Try object.substring('.',' '); On Mon, Sep 14, 2009 at 3:40 PM, runrunforest craigco...@gmail.com wrote: Hi, I have an array like this cat=(com12, com1, cop233, com1.1, sap-12-1) I want to take out all the numbers and . and - signs the desire result is cat=(com, com, cop, sap) how can i do that please ? -- Regard Mohammad.Tareque
[jQuery] Re: ajaxForm - upload issue
the thing is that the script work ok without ajax.. I am using many upload scripts and the normal PHP one works perfect :|
[jQuery] Re: animate : animable properties
Hello, I didn't find any solution for my problem yet. Can anyone help me ? I have a JS object defining CSS properties. I'd like to remove from this object all the properties that can't be animated. example : I have this object : var myObject = { height: '100px', width: '100px', color: 'red', 'margin-top': '25px', overflow: 'auto' } I want to get only the properties I can use to make an animation, so the result should be : var myObjectFiltered = { height: '100px', width: '100px', 'margin-top': '25px' } But I know jQuery plugins can add some animations possibilities, like animating colors for example. In this case the result should be : var myObjectFiltered = { height: '100px', width: '100px', color: 'red', 'margin-top': '25px' } anyone knows how to do this ? thanks Nico I'm coding a jQuery plugin to draw modal windows. In this plugin, I make animations to show and hide the modal window. I'd like my plugin to be as much customizable as possible. So I want the animations to be customizable also. To do this, I have one option for the general css properties (the style of the window), one for css properties before showing animation, and one for css properties after hidding animation. To make the show animation, I start by applying general style + before styles (before styles overwrites general styles). Than I get the difference between before styles and general styles,, and I use this object as the animation properties. To make the hide animation, the general styles are already applied, I just launch an animation using the after hiding styles as the animation properties. All this works very well, but I have just one small problem : All css properties can't be used as animation properties. And if I try to launch an animation with a non-animable css property, than the animation bugs. So I have to filter the properties I give to the animate function, to remove all non-animable properties. But to do this, I have to get a list of animable css properties. Does someone knows how I can manage to get this list ? is there something like this in jQuery ?
[jQuery] Re: jquery question on slideUp fadeIn and show
It's a moot point anyway. Got into work this morning to find that the embedded browser in the price checkers doesn't play nice with even the slideIn/slideOuts. :\ kev. On Sep 14, 7:29 am, ryan.j ryan.joyce...@googlemail.com wrote: have you tried to use a callback instead of the setTimeout? On Sep 14, 11:37 am, kev. yu210...@gmail.com wrote: Hi All, jquery noob question here. I've got a php script that runs a few price checker kiosks out on the sales floor at work and I've got a p element that I can get to slide up when a product is scanned and slide back down after a 5 second pause with: $(function() { $(p).slideUp(slow); setTimeout(function(){ $(p).slideDown(slow); }, 5000); }); but when I change the slideUp and slideDown to fadeIn and fadeOut I'm not getting the element to fade in or out. Instead the element shows up on the screen then after 5 seconds the element appears in the position where it ends up after a slideUp. Similarly if I change the slideUp and slideDown to 'show' and 'hide' the element again shows up in the spot that it starts the slideUp from then slides up after 5 seconds. Any thoughts on what I'm doing wrong? Thanks in advance.
[jQuery] Re: animate : animable properties
Try this: function filterInanimate(obj) { var newObject = {}; var goodProps = ['width','height','left','right','top','bottom','margin','background']; for (prop in obj) { if ($.inArray(prop, goodProps) != -1) { newObject[prop] = obj[prop]; } } return newObject; } the goodProps array stores all the properties which you would like to be able to animate. Feed the object which you want filtering into the function to have the filtered object returned: var filteredObject = filterInanimate(myObject); MisterV wrote: Hi, I'm coding a jQuery plugin to draw modal windows. In this plugin, I make animations to show and hide the modal window. I'd like my plugin to be as much customizable as possible. So I want the animations to be customizable also. To do this, I have one option for the general css properties (the style of the window), one for css properties before showing animation, and one for css properties after hidding animation. To make the show animation, I start by applying general style + before styles (before styles overwrites general styles). Than I get the difference between before styles and general styles,, and I use this object as the animation properties. To make the hide animation, the general styles are already applied, I just launch an animation using the after hiding styles as the animation properties. All this works very well, but I have just one small problem : All css properties can't be used as animation properties. And if I try to launch an animation with a non-animable css property, than the animation bugs. So I have to filter the properties I give to the animate function, to remove all non-animable properties. But to do this, I have to get a list of animable css properties. Does someone knows how I can manage to get this list ? is there something like this in jQuery ? Nico -- View this message in context: http://www.nabble.com/animate-%3A-animable-properties-tp25297303s27240p25436295.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jquery validate and datepicker.
Hi, Sorry you haven't received a response yet. Usually Jörn picks up questions about the validate picker, but he's been traveling for the past week. Also, datepicker questions are usually handled on the jquery-ui google group. In any case, it looks like the the validation message is triggered on blur of the field. I don't recall how datepicker works, but I would sort of expect the focus to go back to the date input element when a date is selected from the datepicker. Since that isn't happening now, you can make it happen by adding an onClose or onSelect method to your datepicker options: http://jqueryui.com/demos/datepicker/#event-onSelect That way, the validation thing will be triggered when the user clicks or tabs out of the field after that point. Hope that helps. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 13, 2009, at 6:45 PM, Williamk wrote: Was it something I said? Or didn't say? :/ On Sep 8, 8:28 am, Williamk bkopl...@gmail.com wrote: Oh, I put the demo page for the remember the milk with the datepicker on a site, so you can see what I am talking about. No porn or viagra or Nigerian cons or anything else dubious. If you are interested:http://avianflew.com/milk/ On Sep 7, 9:48 pm, Williamk bkopl...@gmail.com wrote: For some reason, and this is baffling me, if I use both the validation plugin and the datepicker plugin, some voodoo is occurring. I have to select the date twice for it to validate. For example, here are the steps I took: I try to submit the form without dates in the fields. The form is not sent and the date fields are flagged. If you open it once and select a date, the calendar closes, but it still shows as invalid. If you repeat this action, selecting the same exact field and opening the calendar and selecting the date again, then it shows as valid. I'm not sure how to shoehorn this into validating on the first click on the calendar. And to be honest, I'm terrified I'm going to get flamed over this. I generally consider myself pretty resourceful, but this is making me a little bit loco.
[jQuery] Re: Removal of element before body
To remove them you could use $(function() { $(br).remove(); }); but to find where they are is more difficult, as you could end up removing key elements like the head tag itself. If it's placing it where you don't want it to, maybe the script needs tweaking? Could you possibly post it here, or even a link would be better? That would enable me to help you a bit easier. Mike However in order to detect where they are in the document is more difficult. On Sep 14, 12:43 pm, paulswansea sendtoswan...@hotmail.com wrote: Hi, How can I remove an element before the body of the document, the long and the short of it is that a script I use places a br statement (amongst other things) dynamically into my web pages and based upon which browser I use, sometimes it places it inside the head and sometimes places it before the head and in some browsers not at all. I know it shouldn't, but it does. So basically, is there a way of removing the br statement if it exists before the body element?
[jQuery] Re: trim string
Try this: function filterArray(arr) { var newArr = []; for (var i = 0; i arr.length; i++) { newArr.push(arr[i].replace(/[0-9\-.]/g, '')); } return newArr; } runrunforest wrote: Hi, I have an array like this cat=(com12, com1, cop233, com1.1, sap-12-1) I want to take out all the numbers and . and - signs the desire result is cat=(com, com, cop, sap) how can i do that please ? -- View this message in context: http://www.nabble.com/trim-string-tp25433275s27240p25436583.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Why no entire text is replaced when I pick a date on the datepicker?
Would you mind posting this question to the jquery-ui google group if you haven't done so already? That group is dedicated to questions such as yours that are specifically related to jQuery UI. http://groups.google.com/group/jquery-ui/ Thanks! --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 13, 2009, at 12:47 PM, wei wrote: I have a datapicker on the date field with a format of -mm-dd. After selecting a date on the datepicker, only a portion of the default value is replaced. Can someone tell me what is missing and how to resolve this problem? Thanks very much in advance.
[jQuery] Re: Twitter for support?
Twitter is highly ephemeral and I don't think it's a good idea to split support out into a series of venues. I see this same thing in other software groups with IRC instead of Twitter and I think it's *much* better to use something like Google groups for discussion or a permanent page on a jQuery (or your own) site for anything which is boiled down to an answer. Every time I see that was answered on IRC or come ask us on IRC I cringe because I know that valuable information was just lost to the community (searching irc logs for 100 different channels to find an answer is unreasonable) while it was disseminated to a single user or a clique. Any time something like this comes up don't consider how you're helping an individual but how your work could be leveraged to help everyone involved for the foreseeable future and with the least amount of repetition. To me Twitter is right out for this. (By the way, love your plugins and really appreciate how much support you give on them; very impressive). -Ashley On Sep 13, 11:53 am, Mike Alsup mal...@gmail.com wrote: Over the past few months I've been fielding an increasing number of support requests via Twitter (for Cycle, BlockUI, and Form plugins). In some ways it's a nice way to respond to simple questions but obviously it's not well-suited for more in-depth questions and responses. I generally direct people to this Google Group for anything non-trivial but I'm wondering what others think about leveraging Twitter for simple QA. Thoughts? Mike http://twitter.com/malsup
[jQuery] Re: Twitter for support?
+100 -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Ashley Sent: Monday, September 14, 2009 12:21 PM To: jQuery (English) Subject: [jQuery] Re: Twitter for support? Twitter is highly ephemeral and I don't think it's a good idea to split support out into a series of venues. I see this same thing in other software groups with IRC instead of Twitter and I think it's *much* better to use something like Google groups for discussion or a permanent page on a jQuery (or your own) site for anything which is boiled down to an answer. Every time I see that was answered on IRC or come ask us on IRC I cringe because I know that valuable information was just lost to the community (searching irc logs for 100 different channels to find an answer is unreasonable) while it was disseminated to a single user or a clique. Any time something like this comes up don't consider how you're helping an individual but how your work could be leveraged to help everyone involved for the foreseeable future and with the least amount of repetition. To me Twitter is right out for this. (By the way, love your plugins and really appreciate how much support you give on them; very impressive). -Ashley On Sep 13, 11:53 am, Mike Alsup mal...@gmail.com wrote: Over the past few months I've been fielding an increasing number of support requests via Twitter (for Cycle, BlockUI, and Form plugins). In some ways it's a nice way to respond to simple questions but obviously it's not well-suited for more in-depth questions and responses. I generally direct people to this Google Group for anything non-trivial but I'm wondering what others think about leveraging Twitter for simple QA. Thoughts? Mike http://twitter.com/malsup
[jQuery] Re: animate : animable properties
Hi, the goodProps array stores all the properties which you would like to be able to animate. In fact I already use this solution. I defined a table with all the properties that can be animated, and than I use this reference as a filter. But this way, I don't handle custom animation properties. For example, if I use the plugin Color Animations, than the color property can be animated. But this property is not in my filter table, so I won't be able to use it. Or I'll have to register the property in my filter table before I can use it, and I don't want to do this. I'd like to be able to ask jQuery which properties can be animated, and build my filter table from this information. It should be possible to get this info, no ? How jQuery knows how to handle each property ? Nico
[jQuery] Re: Flipv Vertical Text and extra space
Oh, and also - there's a little drop down box in the top right corner which will allow you to change the language to English :-) On Sep 14, 11:24 am, Paul Collins pauldcoll...@gmail.com wrote: Hi all I'm currently using the Jquery Flipv plugin, which works well. The only problem is, some words have extra padding at the end, depending on how many characters.http://www.openstudio.fr/jQuery-flipv.html?lang=en I'm not sure why this is, but it seems that the conversion to vertical text creates some extra spacing on certain browsers. Can anyone tell me why this is? I'm trying to get advice through the site, but it's all in French and I can't understand it! Thanks for any help
[jQuery] detecting events on iframe: reload
Can I detect somehow if a content has been loaded in an iframe? I'm not talking about the first loading of the iframe, but afterwords. I have a flash movie inside an iframe and this flash movie loads a document in the iframe when a button is clicked, all I want is the main page to detect when this content has been loaded or when iframe content is modified or refreshed... Any hints?
[jQuery] Re: saving values from a multi select list.
Ok so i thought that maybe the problem had something to do with the ajax request so i tried adding the ajaxStart function. See below. $(#ddl_customer).change(function(){ $(#ddl_customer).ajaxStart(function() { cuslist = $(this).val().join(, ); }); alert(cuslist); }); $(#ddl_customer).selectChain({ target: market, url: callback_url, type: POST, data: { ajax: true, multsel: market_selects, cust_val: cuslist } }).trigger('change'); So im trying to get all the selected values from ddl_customer in the first block of code. then pass it to cust_val in the second block of code. note that the alert(custlist) outputs what i expect. but when i check cust_val in firebug it outputs the entire list, not only selected values. Please Help!:(
[jQuery] Hide/Show based on radio button selected
I am trying to create a script that will display content based on if a radio button is selected, and if the other is selected would hide the content. Now, each of these radio buttons are part of a radio group, so their names are the same. Most examples show input:radio [...@name=item] Since I have 2 items that have the same name, I can't use name, so I thought I would try id or value. It isn't working. If I add only the show, whenever you select either radio button, it shows, and if I add the hide code, it doesn't work at all. Here is what I have right now. $(document).ready(function(){ $('#offices_checkboxes').hide(); $(input:rad...@value=1]).click(function() { $(#offices_checkboxes).show(); }); $(input:rad...@value=0]).click(function() { $(#offices_checkboxes).hide(); }); }); Anybody have an idea of how I could get this to work?
[jQuery] 'key' related events throw up warnings in FF
Hi everyone Everytime I try to use a keyup/keypress/keydown event in my code, I get a warning in my Firebug whenever it is fired: The 'charCode' property of a keydown event should not be used. The value is meaningless. I'm not quite sure what this means, but I'm guessing it's because I have not set the value of a particular key - however, this is not required for my function which basically just makes a button appear when the user puts text in an input field. My function: $(function() { $(#myinput).keyup(function() { var theval = $(#myinput).val(); var mybutton = $(#thebutton); if(theval!=){ mybutton.fadeIn(200); }else{ mybutton.fadeOut(200); } }); }); Which seems to actually word - except I get the warning above. Does anyone know how to avoid this happening? Thanks, Mike
[jQuery] Re: (validate) dash/hyphen in radio id problem
I tried building a testcase and it appeared that the problem was not id-with-dash related, it's the radio buttons validation that simply wasn't working at all ! There's a demo of radio buttons validating at http://jquery.bassistance.de/validate/demo/radio-checkbox-select-demo.html but it is using the validate=required:true attribute to do so, and this breaks the w3c validation of the code... I've eventually found by trial and error that it is working if I use the name attribute instead of the id attribute in the rules : rules: { genre: { required: true } } Now I just have to sort out the place where the error message is displayed and that'll be fine. I hope this can help others when they encounter that same problem... On 14 sep, 13:31, mattso matthieu.larc...@gmail.com wrote: I've tried using the quotes on names that don't have a dash in it and this works, but it won't work with the ones that do contain a dash (-) (they are radio buttons) Is this really supposed to work ? Any clue would be appreciated On 11 sep, 16:03, mattso matthieu.larc...@gmail.com wrote: Thanks for your reply, Jörn. I've tried : rules: { genre-f: genreCheck, genre-m: genreCheck } and : rules: { genre-f: { genreCheck: true }, genre-m: { genreCheck: true } } with : $.validator.addMethod('genreCheck', function (value) { alert('called'); if( $(#genre-f).is(:checked) || $(#genre-m).is(:checked) ){ return true; }else{ return false; } }, Please select a genre.); but I don't get any error message and the alert in the genreCheck function shows it's not even called. Any idea why ? On 11 sep, 15:40, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Seehttp://docs.jquery.com/Plugins/Validation/Reference#Fields_with_compl... Jörn On Fri, Sep 11, 2009 at 2:26 PM, mattso matthieu.larc...@gmail.com wrote: Hi, I'm using the bassistance.de Validation Plugin for jQuery and I have the following problem : When using a dash(-) separated id for genres (i.e. genre-f / genre-m), I get the following js error : missing : after property id with the following code: rules: { genre-f: { required: #genre-m }, genre-m: { required: function() { return $(#genre-f).is(:checked); } }, It seems that the js (json?) doesn't allow the use of a - inside a variable name. Unfortunately, I can't change the id names, as they are being generated by Zend Framework which doesn't allow to replace it with another character. Anybody would know a way around this ? It seems to me that in the case of multi-options inputs, the script should focus on the name instead of the id... Any clue would be appreciated.
[jQuery] Re: Browser Stop call's ajax.Error
Probably because you're sending the data to the url, but stopping the process before it can produce a result. On Sep 13, 7:52 pm, nirazue...@gmail.com nirazue...@gmail.com wrote: Hi, I've noticed that when I click the Stop button on the browser, or navigate to another page, jQuery.ajax calls the error event. You can see the problem live at:http://www.pingmyport.com/ Code: this.getJson = function(timeout) { if(this.XMLHttpRequest) this.XMLHttpRequest.abort(); this.XMLHttpRequest = $.ajax({ complete: function(){$(#kitLoader).hide();}, data: { Address: him.Address, portNum: him.portNum, portType: him.portType }, dataType: json, error: him.serviceUnavailable, success: him.processJson, timeout: timeout, type: POST, url: http://www.pingmyport.com/checkPort.php; }); };
[jQuery] Re: shadowbox / ajax IE8.0.6 issue
I'm not sure what's going on there, but you may have better luck at the Shadowbox forum: http://www.shadowbox-js.com/forum.html --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 13, 2009, at 8:17 PM, Duncan wrote: Hi All, We have an issue in our site that only occurs in IE 8.0.6, 8.0.7 / FF / Chrome / Safari are all fine. To replicate visit http://www.sportsmembership.com.au/narrenorthcc/players-participants/adult-players-fees-280-00/ and click add to cart on one of the 1/2/3 month badges. We take some attributes, hit an ajax call to add the item to the cart, and update the cart badge in the black bar. For some reason IE 8.0.6 just doesnt like it and we cant put our finger on it. Feedback from a user: 'When making the selection the window kept freezing and would not allow us to go any further. We had to control, alt, delete to get out of the screen.' Any help greatly appreciated. -- Duncan I Loxton duncan.lox...@gmail.com
[jQuery] Re: something amiss with json call/file
The problem ended up being my call to .getJson and something about how jQuery was recogzing the url as being cross domain. I changed the call to the file to be relative and it is working now. Thanks for the help. On Sep 11, 4:57 pm, Scott Haneda talkli...@newgeo.com wrote: Maybe your use of appendTo is wrong, I just did this test: $.getJSON(http://www.pomona.edu/dev/home/spotlight.json;, function(data){ $.each(data.items, function(i, item){ $(div).append(i); }); }); div id=images/div I got 01234, so the index of each item in your JSON. With that, you know your JSON is ok, and you need to look at what appendTo is not working. Sorry I can not be of more help, this is about day 2 of Jquery for me. On Sep 11, 2009, at 3:56 PM,roryreiffwrote: I have the following code: // pull in json feed and inject panes into page $.getJSON(http://www.pomona.edu/dev/home/spotlight.json;, function(data){ $.each(data.items, function(i,item){ $('div class=\pane\/div').appendTo('#spotlight-panes'); }); }); and I cannot figure out what is going wrong. As you can see, I am not even trying to do anything yet with the json data, but assuming that I should still be seeing some divs injected into the DOM. Wondering if there is something wrong with my JSON file? Any help is appreciated...I just can't figure out what is going on! Code in effect here:http://pomona.edu/dev/home/index.aspThanks, -- Scott * If you contact me off list replace talklists@ with scott@ *
[jQuery] Re: Flipv Vertical Text and extra space
Flipv only supports Verdana font fully, is this the font you're using? Also, do you have a link to your code, and which browsers are causing problems? Mike On Sep 14, 11:24 am, Paul Collins pauldcoll...@gmail.com wrote: Hi all I'm currently using the Jquery Flipv plugin, which works well. The only problem is, some words have extra padding at the end, depending on how many characters.http://www.openstudio.fr/jQuery-flipv.html?lang=en I'm not sure why this is, but it seems that the conversion to vertical text creates some extra spacing on certain browsers. Can anyone tell me why this is? I'm trying to get advice through the site, but it's all in French and I can't understand it! Thanks for any help
[jQuery] Re: Hide/Show based on radio button selected
Just off the top of my head, but may work... $(document).ready(function() { $('#offices_checkboxes').hide(); $('input:radio[name=radioName]:checked').click(function() { $('#offices_checkboxes').show(); }); $('input:radio[name=radioName]:not(:checked)'.click(function() { $('#offices_checkboxes').hide(); }); }); This code makes use of the name of the radio button group, as well. hth, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of mtuller Sent: Monday, September 14, 2009 11:14 AM To: jQuery (English) Subject: [jQuery] Hide/Show based on radio button selected I am trying to create a script that will display content based on if a radio button is selected, and if the other is selected would hide the content. Now, each of these radio buttons are part of a radio group, so their names are the same. Most examples show input:radio [...@name=item] Since I have 2 items that have the same name, I can't use name, so I thought I would try id or value. It isn't working. If I add only the show, whenever you select either radio button, it shows, and if I add the hide code, it doesn't work at all. Here is what I have right now. $(document).ready(function(){ $('#offices_checkboxes').hide(); $(input:rad...@value=1]).click(function() { $(#offices_checkboxes).show(); }); $(input:rad...@value=0]).click(function() { $(#offices_checkboxes).hide(); }); }); Anybody have an idea of how I could get this to work?
[jQuery] Re: Unknown pseudo-class or pseudo-element 'odd'.
Not sure why you're having this problem, but take a look at the very simple test case here: http://test.learningjquery.com/alt-rows.html It seems to work fine. Maybe something else is going on in your code or markup? Hard to tell from that snippet. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 13, 2009, at 2:19 PM, shapper wrote: Hello, I am using JQuery 1.3.2 and the following code line: $(table.Engine tbody tr:odd).addClass(Alternate); I get the following error on firebug: Unknown pseudo-class or pseudo-element 'odd'. What am I doing wrong? Thanks, Miguel
[jQuery] Re: Jquery Starter - Need help
Two things: 1. You don't have an id set for the loadagain button, so jQuery won't be able to find it. 2. That button doesn't exist (yet) after document.ready has completed, so you can't bind it like that. You'll need to use live for event delegation: Change $('#loadagain').click(function(){ to $('#loadagain').live(click, function(){
[jQuery] help with indexing items with random variable to appear in correct order
Hello, Below is a script I am working on for a slideshow for a set of 5 divs. I am generating a random number to represent the index of the starting div, i.e. the one that gets displayed in the middle. All of the other 4 divs get relative indexes so that they appear either to the left or right of the starting div. When the forward or backward buttons get clicked, 4 of the 5 divs animate and the 5th gets positioned to the oppossite far side as it should. My problem is that when I am performing my initial $.getJson call, I need to set an id on each 5 (to the formula of pane-0, pane-1, etc.). This ID determines the initial positioning of the divs. My issue is that I am trying to set that ID in relationship to the variable startingPane, and something isn't getting set right when the starting pane is either the 4th or 5th div. Once the arrow buttons are clicked, my two functions set everything right and it all works great from there...I am just having an issue with the initial injection and how to set those IDs correctly such that they take my startingPane variable into account and maintain the correct ordering (i.e., the relational order of the panes should always be middle, right, farRight, farLeft, Left and then middle again and so on). Anyone have any suggestions? The jQuery file is viewable at http://www.pomona.edu/dev/home/spotlight-gallery.js and the page calling it at http://pomona.edu/dev/home/index.asp Thanks for any help/input you can give.
[jQuery] Re: help with indexing items with random variable to appear in correct order
I would also be interested in comments/suggestions about how this code or even approach could be simplified/improved. It seems pretty lightweight and simple to me, but I have very little idea about it's performance and am curious if I am doing something that is unnecessary or just plain pointless. On Sep 14, 10:28 am, roryreiff roryre...@gmail.com wrote: Hello, Below is a script I am working on for a slideshow for a set of 5 divs. I am generating a random number to represent the index of the starting div, i.e. the one that gets displayed in the middle. All of the other 4 divs get relative indexes so that they appear either to the left or right of the starting div. When the forward or backward buttons get clicked, 4 of the 5 divs animate and the 5th gets positioned to the oppossite far side as it should. My problem is that when I am performing my initial $.getJson call, I need to set an id on each 5 (to the formula of pane-0, pane-1, etc.). This ID determines the initial positioning of the divs. My issue is that I am trying to set that ID in relationship to the variable startingPane, and something isn't getting set right when the starting pane is either the 4th or 5th div. Once the arrow buttons are clicked, my two functions set everything right and it all works great from there...I am just having an issue with the initial injection and how to set those IDs correctly such that they take my startingPane variable into account and maintain the correct ordering (i.e., the relational order of the panes should always be middle, right, farRight, farLeft, Left and then middle again and so on). Anyone have any suggestions? The jQuery file is viewable athttp://www.pomona.edu/dev/home/spotlight-gallery.jsand the page calling it athttp://pomona.edu/dev/home/index.asp Thanks for any help/input you can give.
[jQuery] Re: Superfish: Leave sub ul menu visible when a tag class is set as active
No idea? Well, is there a way to disable superfish for one li item? I can probably find if there's an active a tag somewhere, but I'd need to disable superfish for that item, and make the nested ul visible by default. On Sep 13, 2:36 pm, LoicDuros loic.du...@gmail.com wrote: Hello, I'm using superfish for a drop down hover menu. It works perfect except I would like the sub menus to remain visible when one of the a tag from the menu has class=active. Here is a quick overview of the menu html: ul class=primary-links li a href=mainitem parent 1/a ul lia href=page2item child/a/li /ul /li /ul If the current page is main -- class='active' is automatically added to the A tag (with Drupal). If you are currently in page2, the class='active' is added to the A tag of the sub-menu. Now, how can I get the sub menu to be always displayed -- regardless of superfish, either when item parent 1 A tag is set as class='active' of the item child A tag is set as class='active'. If you can direct me toward what I'd need to achieve this, it would be great! Thanks so much for your help!
[jQuery] Re: help with indexing items with random variable to appear in correct order
Was trying some other options and basically figured out the indexing/ setting the id issue: .attr('id', 'pane-' + ((LENGTH - startingPane) + i) % LENGTH ). I am still curious about this codes performance though and any suggestions as to how it could be made better. Thanks, On Sep 14, 10:43 am, roryreiff roryre...@gmail.com wrote: I would also be interested in comments/suggestions about how this code or even approach could be simplified/improved. It seems pretty lightweight and simple to me, but I have very little idea about it's performance and am curious if I am doing something that is unnecessary or just plain pointless. On Sep 14, 10:28 am, roryreiff roryre...@gmail.com wrote: Hello, Below is a script I am working on for a slideshow for a set of 5 divs. I am generating a random number to represent the index of the starting div, i.e. the one that gets displayed in the middle. All of the other 4 divs get relative indexes so that they appear either to the left or right of the starting div. When the forward or backward buttons get clicked, 4 of the 5 divs animate and the 5th gets positioned to the oppossite far side as it should. My problem is that when I am performing my initial $.getJson call, I need to set an id on each 5 (to the formula of pane-0, pane-1, etc.). This ID determines the initial positioning of the divs. My issue is that I am trying to set that ID in relationship to the variable startingPane, and something isn't getting set right when the starting pane is either the 4th or 5th div. Once the arrow buttons are clicked, my two functions set everything right and it all works great from there...I am just having an issue with the initial injection and how to set those IDs correctly such that they take my startingPane variable into account and maintain the correct ordering (i.e., the relational order of the panes should always be middle, right, farRight, farLeft, Left and then middle again and so on). Anyone have any suggestions? The jQuery file is viewable athttp://www.pomona.edu/dev/home/spotlight-gallery.jsandthe page calling it athttp://pomona.edu/dev/home/index.asp Thanks for any help/input you can give.
[jQuery] Display background image in optgroup on IE
Guys, I'm wondering if any of you might have some kind of jquery related hack in order to be able to display background images in IE (6,7,8) for the OPTGROUP element. I've been looking for a way to acomplish this everywhere with no luck. I'll appreciate any leads. Thanks! -- Rodrigo Alfonso
[jQuery] (validate) email validator
How come the validator for emails only needs one letter for the tld and allows non valid characters like / or * ?
[jQuery] Re: (validate) email validator
The one letter for tld is probably a bug. The characters you list are legal to the left if the last @ sign. -- Scott Iphone says hello. On Sep 14, 2009, at 10:59 AM, mattso matthieu.larc...@gmail.com wrote: How come the validator for emails only needs one letter for the tld and allows non valid characters like / or * ?
[jQuery] Changing the slider value programatically
How do I reset a slider value after it has been declared from a calling page? I have a modal box, that has a form in it. I use this form to add/ edit items. Within that form, I have a slider from jquery UI. When I click on a link to bring up the modal box and EDIT data, I'm having trouble populating the slider with the appropriate value. Anyone know how? THANKS IN ADVANCE! Here is the relevant code from my files: MAIN PAGE: script type=text/javascript !-- $(document).ready(function() { $('#addItem, .editItem').click(function(e) { e.preventDefault(); // load the contact form using ajax $.get(modalForm.cfm, {'action' : $(this).attr(name)}, function (data){ // create a modal dialog with the data var d = $(div/div).append(data); $(d).modal({ overlay:80, overlayCss: {backgroundColor:#c0c0c0}, escClose: true, overlayClose: true, // position: [e.pageY,e.pageX], onOpen: function(modal) { modal.overlay.fadeIn(5, function() { modal.data.hide(); modal.container.fadeIn(5, function() { modal.data.slideDown('fast'); }); }); } }); $(#slider).slider({ value:80, min: 20, max: 100, step: 20, animate: true, orientation: 'horizontal', slide: function(event, ui) { $(#slideramount).val(ui.value); } }); }); }); }); // -- /script MODAL FORM PAGE: div id=slider style=width:150px;font-size: 9px;font-family: Arial;/div
[jQuery] [validate]
I am using jQuery validate plug in. I have configured validate plug in for two text fields. Error message are displayed right below the text box in case of empty or invalid input in FF and IE7. Only IE6, displays the error message next to the text box and it wraps it from there. Any ideas how to fix this problem in IE6.
[jQuery] jCarousel and links
HI I am trying to work with the jCarousel plugin by Ian Sorgalla http://sorgalla.com/jcarousel/ Does anyone know how I could wrap a link around each of the images in the Carousel ?
[jQuery] iframe accesing main document functions?
Is this possible? Been trying but doesn't seem to work...
[jQuery] Problem with .live() events in a widget in FF3
I am creating a simple jQuery widget and have the following two lines in the _init() method. this.element.find(li.thumb img).css(cursor, pointer); this.element.find(li.thumb img).live(click, function() { alert (); }); The addition of the style property in the first line works in both IE7 and FF3. However, the binding of the event in the second line only works in IE7, not in FF3. Elements are dynamically added to the widget so I need to use the .live () method. Any thoughts on why this may be occurring? Thanks
[jQuery] Re: unblockUI() problems in IE
Try the code as bellow: $.unblockUI(); $(.blockUI).fadeOut(slow); -- The code can fix unBlockUI which problem with IE6/7/8 On Sep 4, 1:38 am, Matthew Abbott dduck1...@gmail.com wrote: Im using the blockUI() plugin in jquery and I attached a click event to a button to call the unblockUI(). What it does is make the content of the block disappear, but the block and the modal background still are visible. This is only happening in IE. Im using IE7 currently. Firefox is fine. Any help is appreciated. -Matthew
[jQuery] each() needs documentation
Hello! I could not find each() in jQuery's documentation. Could it be included there, please, as I was browsing all the features to find out what exactly is the collection of elements returned by the many JQuery functions and how to be able to access and manage each of them separately, but could not find a page for each anywhere (which I found on some tutorial later). Regards, Janis
[jQuery] Intercept javascript event
Here's what I'm trying to do : I have a page with some links. Most links have a function attached to them on the onclick event. Now, I want to set a css class to some links and then whenever one of the links is clicked I want to execute a certain function - after it returns , I want the link to execute the onclick functions that were attached to it. Is there a way to do what I want ? Here's an attempt at an example : $(#link).click(function1); $(#link).click(function2); $(#link).click(function(){ firstFunctionToBeCalled(function (){ // ok, we're inside the callback - now execute function1 and function2 }); }); // somehow this needs to be the first one that is called function firstFunctionToBeCalled(callback){ // here some user input is expected so function1 and function2 must not get called callback(); } All this is because I'm asked to put some confirmation boxes (using boxy) for a lot of buttons and I really don't want to be going through every button.
[jQuery] Buy or sell
We have great deals for Real Estate Investors. As real estate investors ourselves we are very eager to work with other real estate investors like you. http://www.greenmiraclesinc.com/inv.php?sysac=9pg=26tm=
[jQuery] ajaxForm error call back
How do I access my form object inside of the error callback? $('#foo').ajaxForm({ error: function(){ // where's my $('#foo') object here? } });
[jQuery] jQuery / Plugin history and callback
Hi, I'm working on my own plugin jquery but I have a issue and I don't find any solution. The plugin handles tabs. One main feature about this homemade plugin is to manage static en ajax tabs and an history. When the user click on back or forward button, tabs is reloaded. So I use this plugin for history http://www.mikage.to/jquery/jquery_history.html which requires a callback (init). My issue : if I have many tabs on my page, the callback (it's a function that loads the content match in URL (#) remembers only the last DOM element. I need that is a callback associate for each tabs. Plese find below my code $.fn.myTabs = function(options) { /* GLOBAL VARIABLES --- */ var obj = $(this); var currentLocation = ; var currentLocationHash = document.location.hash; var newHash = ; var boolHash = true; /* PLUGIN DEFAULT VARIABLES --- */ var defaults = { element_tab: obj.next(div), // elementstoTab element_link: obj.find(li a) // link }; /* CUSTOM VARIABLES IN PARAM --- */ var options = $.extend(defaults, options); obj.each(function() { init(); }); /* init() --- */ function init() { applyTabs(); $.history.init(checkTabUrl); } /* applyTabs() --- */ function applyTabs() { obj.addClass(tabs); options.element_link.click( function() { boolHash == true; newHash = $(this).attr(href).replace(/^.*#/, ''); $.history.load(newHash); return false; }); } /* checkURL() --- */ function checkTabUrl() { currentLocationHash = document.location.hash if (currentLocationHash != ) { verifDOM(currentLocationHash); } } /* verifDOM() --- */ function verifDOM(element) { var countElement = 0; var regPattern = '/' + element + '$/'; var regex = new RegExp( eval(regPattern) ); var response = false; var urlAjax = ; $(ul.tabs).each( function() { $(this).find(li a).each( function () { response = regex.test( $(this).attr(href) ); if ( response == true ) { countElement = countElement + 1; urlAjax = $(this).attr(href).split(regex)[0]; } }); }); if (countElement == 1 urlAjax != ) { loadTab(urlAjax); } } /* loadTab() --- */ function loadTab(urlAjax) { obj.children(li).removeClass(active); var elt = obj.find(li a[href*=' + urlAjax + ']); elt.parent(li).addClass(active); $.ajax( { type: GET, url: urlAjax, datatype: html, cache: false, success: function(response) { $(.ajax-loading).fadeOut(); options.element_tab.fadeOut(function(){ options.element_tab.html(response).fadeIn(); } ); $(.ajax-loading).fadeOut(); }, beforeSend: function() { if ( $(.ajax-loading).length 1 ) { options.element_tab.append(div class='ajax-loading'/div); $(.ajax-loading).fadeIn(); } } }); } };// end plugin Any have idea to solve my problem ? Thanks a lot (sorry for my bad english, I'm french :D)
[jQuery] Re: each() needs documentation
Did you really look for it? It's like the 2nd or 3rd link under Core. http://docs.jquery.com/Core/each#callback On Sep 14, 6:53 am, Jānis eye...@gmail.com wrote: Hello! I could not find each() in jQuery's documentation. Could it be included there, please, as I was browsing all the features to find out what exactly is the collection of elements returned by the many JQuery functions and how to be able to access and manage each of them separately, but could not find a page for each anywhere (which I found on some tutorial later). Regards, Janis
[jQuery] Re: ajaxForm error call back
How do I access my form object inside of the error callback? $('#foo').ajaxForm({ error: function(){ // where's my $('#foo') object here? } }); One way is like this: $('form').ajaxForm({ beforeSerialize: function($form, opts) { opts.$form = $form; }, error: function() { // access form via this.$form this.$form.hide(); } });
[jQuery] Re: Odd problems with jQuery and XHTML in Firefox.
On Jul 30, 5:26 am, Ricardo ricardob...@gmail.com wrote: $('body').append( $('p/').text('hello') ); I'm noticing that the element created with $('p/') has the xhtml namespace when created in a document served as application/xhtml+xml but has no namespace when the document is served as application/xml, how do I explicitly set the namespaceURI?
[jQuery] Re: Grid as Subgrid: '+' symbols not showing up
Sorry, wrong forum...I meant to post to the jqGrid forum. Anyway, just in case anyone wants to know, turns out the answer was to change the 'gridview' parameter to false.
[jQuery] Re: Ajax not working in Firefox
Well, our back-end developer found a way to fix the problem on his end. Once I find out what he fixed to get the ajax working in FF3, I will post again. Thank you everyone for your help! On Sep 11, 4:02 am, Karl Hungus coldnebraskab...@googlemail.com wrote: I reckon you're right Nick - I'm reasonably certain that is the problem. We are using a quite old Java content management system at the server end, and I've already found one place where the direct comparison you mentined is made, so I'm guessing there could well be others within the package itself. There's a bit more here:http://209.85.229.132/search?q=cache:t9DvR4ZnRJ4J:www.experts-exchang... Cheers, KH On 8 Sep, 12:56, Nick Fitzsimons n...@nickfitz.co.uk wrote: 2009/9/4 RPrager ryan.pra...@gmail.com: Here is the only difference I found in the Request Headers: FF2: Content-Type application/x-www-form-urlencoded FF3: Content-Type application/x-www-form-urlencoded; charset=UTF-8 Any ideas? One definite possibility is that the server-side component is failing to cope with the (perfectly valid) inclusion of the charset information in the Content-Type request header. Check with the developer responsible that he isn't doing something silly like (in pseudo-code): if (Request.ContentType == application/x-www-form-urlencoded) // then do the form parsing as this would cause the problem you are seeing, and is also a broken way of parsing a request. Regards, Nick. -- Nick Fitzsimonshttp://www.nickfitz.co.uk/
[jQuery] Re: something amiss with json call/file
It's not jQuery, it's just basic same origin policy. From your example, the calls are cross domain because you were using 'www.pomona.edu' in the getJSON call from 'pomona.edu'. Those are different hosts. On Sep 14, 10:16 am, roryreiff roryre...@gmail.com wrote: The problem ended up being my call to .getJson and something about how jQuery was recogzing the url as being cross domain. I changed the call to the file to be relative and it is working now. Thanks for the help. On Sep 11, 4:57 pm, Scott Haneda talkli...@newgeo.com wrote: Maybe your use of appendTo is wrong, I just did this test: $.getJSON(http://www.pomona.edu/dev/home/spotlight.json;, function(data){ $.each(data.items, function(i, item){ $(div).append(i); }); }); div id=images/div I got 01234, so the index of each item in your JSON. With that, you know your JSON is ok, and you need to look at what appendTo is not working. Sorry I can not be of more help, this is about day 2 of Jquery for me. On Sep 11, 2009, at 3:56 PM,roryreiffwrote: I have the following code: // pull in json feed and inject panes into page $.getJSON(http://www.pomona.edu/dev/home/spotlight.json;, function(data){ $.each(data.items, function(i,item){ $('div class=\pane\/div').appendTo('#spotlight-panes'); }); }); and I cannot figure out what is going wrong. As you can see, I am not even trying to do anything yet with the json data, but assuming that I should still be seeing some divs injected into the DOM. Wondering if there is something wrong with my JSON file? Any help is appreciated...I just can't figure out what is going on! Code in effect here:http://pomona.edu/dev/home/index.aspThanks, -- Scott * If you contact me off list replace talklists@ with scott@ *
[jQuery] Re: Intercept javascript event
One idea: have a look at the Aspect Oriented Programming plugin. See http://plugins.jquery.com/project/AOP and http://code.google.com/p/jquery-aop/ If this isn't exactly what you are looking for, then therin is code to pre- and post-hook existing events. I hope this helps. **--** Steve On Sep 14, 1:05 pm, sirrocco xavier...@gmail.com wrote: Here's what I'm trying to do : I have a page with some links. Most links have a function attached to them on the onclick event. Now, I want to set a css class to some links and then whenever one of the links is clicked I want to execute a certain function - after it returns , I want the link to execute the onclick functions that were attached to it. Is there a way to do what I want ? Here's an attempt at an example : $(#link).click(function1); $(#link).click(function2); $(#link).click(function(){ firstFunctionToBeCalled(function (){ // ok, we're inside the callback - now execute function1 and function2 }); }); // somehow this needs to be the first one that is called function firstFunctionToBeCalled(callback){ // here some user input is expected so function1 and function2 must not get called callback(); } All this is because I'm asked to put some confirmation boxes (using boxy) for a lot of buttons and I really don't want to be going through every button.
[jQuery] Re: Changing the slider value programatically
Left this out accidentally: I have this on the modal box page being called: script type=text/javascript !-- #slider({ value: 60 }); // this value is brought in from the database, but you get the idea // -- /script But this does not change the
[jQuery] Ajax
I made a page that would load 2 html pages, had a footer to show both, 2 links to show indivually, the divs to load them in, and the sticky footer css. My js seems valid, but the page is just completely blank. URL: http://testingspot.hostcell.net/sandbox/tests/jquery/ajax/ajax.html
[jQuery] Re: (validate) email validator
While technically this is correct, a more restrictive approach might be preferable because some email services (hotmail for one) will not send to an email address using anything other than alphanumerics, dots, hyphens, and underscores. On Sep 14, 11:02 am, Scott Haneda talkli...@newgeo.com wrote: The one letter for tld is probably a bug. The characters you list are legal to the left if the last @ sign. -- Scott Iphone says hello. On Sep 14, 2009, at 10:59 AM, mattso matthieu.larc...@gmail.com wrote: How come the validator for emails only needs one letter for the tld and allows non valid characters like / or * ?
[jQuery] Re: Ajax
hi this is all i see in the source of your page !DOCTYPE html html head titleAjax - jQuery Tests/title script src =http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js;/script style i dont think its complete. Might be something wrong on your serverside program. On Tue, Sep 15, 2009 at 9:02 AM, Matt marine.ro...@gmail.com wrote: I made a page that would load 2 html pages, had a footer to show both, 2 links to show indivually, the divs to load them in, and the sticky footer css. My js seems valid, but the page is just completely blank. URL: http://testingspot.hostcell.net/sandbox/tests/jquery/ajax/ajax.html
[jQuery] Re: (validate), submitHandler and custom function
Indeed the message is sent with $.post(...) however it looks like the following code is not called: jQuery.ajaxSetup({ 'beforeSend': function(xhr) {xhr.setRequestHeader(Accept, text/ javascript)} }); and the server side code does not handle the request properly. Thanks! Bogumil On Sep 13, 10:01 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try this: submitHandler: function(form) { $.post(form.action, $(this).serialize(), null, script); } Jörn On Sun, Sep 13, 2009 at 12:42 AM, bgumbiker bogumil.bial...@gmail.com wrote: Hello, I am looking for a way to call successfully custom function from submitHandler to do proper ajax post. Here is my custom function: jQuery.fn.submitWithAjax = function() { this.submit(function() { $.post(this.action, $(this).serialize(), null, script); return false; }) return this; }; Before using validate plugin I had following which worked fine: $(document).ready(function() { $(#my_form).submitWithAjax(); } Now I have added the validation part and have no idea how to call my custom submitWithAjax function?? $(document).ready(function() { $(#my_form).validate({ /*Validations - works perfectly!! */ }, submitHandler: function(form) { /* $(#my_form).submitWithAjax(); - this works but introduces recursion */ /* how to call custom subitWithAjax() ? */ } }); }) Thanks!