[jQuery] Re: create a translate plugin using jQuery

2008-12-21 Thread Balazs Endresz
Then just go for the first one: http://recurser.com/articles/2008/02/21/jquery-i18n-translation-plugin/ On Dec 20, 12:39 pm, rabab chakhmoune rabab.chakhmo...@gmail.com wrote: tkx for your answer, no i want to create a plugin using jquery i  need't a google's machine to translate so i want

[jQuery] Blank input value testing

2008-12-21 Thread Lay András
Hello! Is there any way in jQuery to test if a input value is blank? I mean similar like: if ($F('szoveg').blank()) { ... } in prototype. With jQuery now i'm using this: if ($('#szoveg').val()=='') { ... } but this not test if a input contains only whitespaces. Bye! Lay

[jQuery] Re: Smarter way to write this repetitive code?

2008-12-21 Thread Kean
Some performance improvement, especially if you have a lot of elements. var txt = $('.article-text'); $('.headline').each(function(i) { $(this).click(function() { $(txt[i]).fadeIn(); }) }); On Dec 20, 10:33 pm, chriscoyier chriscoy...@gmail.com wrote: Perfect! Thanks Ryura =) On

[jQuery] Re: Blank input value testing

2008-12-21 Thread Kean
Well blank() was not created in jQuery. You can create a new function for jQuery like this. (function($){ $.fn.blank = function(){ return $.trim(this[0]).length == 0; } })(jQuery) input id=one value=sadf / input id=two value= / $('#one').blank(); // return false $('#two').blank();

[jQuery] Re: create a translate plugin using jQuery

2008-12-21 Thread Alexsandro_xpt
I got a idea, I think the google translator machine is poor between Babylon machine. Babylon machine have a lot of words today, lot of words mean, I think the Babylon machine is a Doctor Know, whatever you type you have a lot answers about you type. I have a initial project with Babylon

[jQuery] Re: replacing more than once

2008-12-21 Thread Dave Methvin
Why does replaceAll only seem to work once in this example? I guess you meant replaceWith?       $(#hello).replaceWith(foo); Once this code executes, it has replaced the element with id=hello (and any children) with the string foo. There is no longer a #hello in the document.

[jQuery] Re: problem in removing and moving

2008-12-21 Thread Kean
ul id=notDiv lib/b/li lib/b/li lib/b/li lib/bspan id=movingI am moving/span/li lib/b/li /ul If i am inserting into any li, regardless where my span#moving is in (ie. it can be in the third li, fifth li etc) var idx = 2; //place with other numbers

[jQuery] Re: blockUI, select box and IE6 (again)

2008-12-21 Thread Mike Alsup
I'm having the same problem that is documented athttp://groups.google.com/group/jquery-en/browse_thread/thread/976e498..., but can't reply to that thread (too old?). To summarize the problem, with IE6, whenblockUIis called theselect boxes dissappear. When unblockUI is called they reappear.

[jQuery] Re: problem in removing and moving

2008-12-21 Thread Dave Methvin
dl   dd...something.../dd !-- MOVE TO HERE -- /dl dl   dd...something... span id=to_moveTO MOVE/span/dd /dl How about this? $(#to_move).parents(dl:first).prev().find(dd).append($ (#to_move));

[jQuery] [validate] ie6 runtime errors

2008-12-21 Thread Sean Allen
posted previously without proper [validate] in title.. reposting... -- i have this code: script type=text/javascript src=//ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js/script script type=text/javascript src=/js/jquery/ jquery.validate.js/script script

[jQuery] Re: How to fade in next div after previous div faded in upon document.ready ?

2008-12-21 Thread Dave Methvin
        $('d...@id$=_div]').hide();         $('d...@id$=_div]').each(function() {                 $(this).fadeIn('slow'); now this code fade in all divs at the same time how to fade in them one after another sequentially ? The best I can do is this: $(function() { var $sequence =

[jQuery] Re: Blank input value testing

2008-12-21 Thread Lay András
Hello! On Sun, Dec 21, 2008 at 3:09 PM, Kean shenan...@gmail.com wrote: Well blank() was not created in jQuery. You can create a new function for jQuery like this. (function($){ $.fn.blank = function(){ return $.trim(this[0]).length == 0; } })(jQuery) input id=one value=sadf /

[jQuery] Re: What is causing this error?

2008-12-21 Thread Dave Methvin
I don't know about the validation issue. The vague title of the thread may mean that nobody answers because they don't know it's about the validation plugin. I did notice this though...      errorPlacement: function(error, element) {          if(element.attr('id') == 'street_number') {      

[jQuery] Re: Expand on link click

2008-12-21 Thread Dave Methvin
It looked like a link clicked would expand it AND the link would load. I did not see the code on that site, but it sounds like you may be trying this: $(someElement).someEffect( ... ); document.location = http://.;; That doesn't allow the effect to finish before you navigate. Instead try

[jQuery] Re: Blank input value testing

2008-12-21 Thread Kean
My version plays nice if you have other libraries that take up the $ namespace (ie, prototype framework) On Dec 21, 7:50 am, Lay András lays...@gmail.com wrote: Hello! On Sun, Dec 21, 2008 at 3:09 PM, Kean shenan...@gmail.com wrote: Well blank() was not created in jQuery. You can

[jQuery] multi-class display toggling

2008-12-21 Thread pantagruel
Hi, I have a menu of links that have multiple classes, for example xObject yObject zObject. I want to dynamically toggle display on elements of this menu dependent on classes, for example lets suppose I have three links: link1 has the classes xObject and yObject link2 has the classes yObject

[jQuery] Re: [validate] ie6 runtime errors

2008-12-21 Thread DumpsterDoggy
First glance, it looks like your first script tag's src attribute is incorrect: script type=text/javascript src=//ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js/script Sean Allen wrote: posted previously without proper [validate] in title.. reposting... -- i have this

[jQuery] Re: How to fade in next div after previous div faded in upon document.ready ?

2008-12-21 Thread crowebster
Thanks ! Works perfectly ! Now could you explain it to me how does the code works ? So I could learn (comprehend) ? Thanks again !

[jQuery] Re: Can I access and change content loaded dynamically after jQuery.js?

2008-12-21 Thread DumpsterDoggy
You can't bind any events to the controls on $(document).ready() if the html isn't there. I would try binding the event after you call $ (#content).load(loadLink,,hideLoader); On Dec 21, 10:17 am, suntrop sprungm...@googlemail.com wrote: Hi there. I am loading some content into my page …  

[jQuery] Re: replacing more than once

2008-12-21 Thread erikober
On Dec 21, 7:49 am, Dave Methvin dave.meth...@gmail.com wrote: Why does replaceAll only seem to work once in this example? I guess you meant replaceWith? Yes, my mistake. $(#hello).replaceWith(foo); Once this code executes, it has replaced the element with id=hello (and any

[jQuery] Re: How to fade in next div after previous div faded in upon document.ready ?

2008-12-21 Thread Dave Methvin
Now could you explain it to me how does the code works ? Yeah, it is kind of crazy... :-) var $sequence = $('div[id$=_div]').hide() Grabs all the divs and hides them, then assigns the jQuery object with all the divs to the $sequence variable. , div = 0; Just sets the div variable to 0.

[jQuery] Re: Can I access and change content loaded dynamically after jQuery.js?

2008-12-21 Thread suntrop
Sorry for that, but how can I bind the event after I call $ (#content).load(loadLink,,hideLoader);? Do I have to replace hideLoader with a function that contains all the new code? Thanks for your help! On 21 Dez., 17:30, DumpsterDoggy chris.mis...@gmail.com wrote: You can't bind any events

[jQuery] Re: Google Reader style endless scroll library?

2008-12-21 Thread ulfe
Check out this, think it's what you are looking for http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/ /Uffe On 20 Dec, 22:47, Eeby moct...@gmail.com wrote: Hey y'all. I'd like to provide endless scrolling of search results in the manner of Google Reader. The thing

[jQuery] Re: Error on validation plugin documentation?

2008-12-21 Thread Jörn Zaefferer
Fixed! Thanks for reporting. Jörn On Sat, Dec 20, 2008 at 3:51 PM, Giovanni Battista Lenoci gian...@gmail.com wrote: Hi, I'm tryng for the first time the validation plugin, I was looking at the doc here: http://docs.jquery.com/Plugins/Validation/validate In the invalidHandler sample code

[jQuery] Re: What is causing this error?

2008-12-21 Thread Rick Faircloth
Your reduction works well, Dave...thanks. As far as the subject line... I had [Validate] at the beginning of it, which is what Jorn requested if the email has to do with his plug-in. Did [Validate] get stripped out? And concerning the error, it's got to do with the validation events. I'm

[jQuery] Re: How to fade in next div after previous div faded in upon document.ready ?

2008-12-21 Thread crowebster
Thanks you very much ! Hope to read more from you. Bye ! Crowebster

[jQuery] Re: What is causing this error?

2008-12-21 Thread Dave Methvin
Did [Validate] get stripped out? Yeah it's strange, when I look at the topic list the [validate] isn't there, but it is when I view the thread list. Do you see it in this view? http://groups.google.com/group/jquery-en/topics

[jQuery] How can I write this function without hard-coding the input and error names?

2008-12-21 Thread Rick Faircloth
Here's the code that I'd like to make flexible to handle all the input id's and error message id's. How could I write it? Thanks, Rick $('input#street_number').blur(function() { if (this.value.length == 0)

[jQuery] Re: Can I access and change content loaded dynamically after jQuery.js?

2008-12-21 Thread Ryura
Try the liveQuery plugin: http://docs.jquery.com/Plugins/livequery On Dec 21, 1:20 pm, suntrop sprungm...@googlemail.com wrote: Sorry for that, but how can I bind the event after I call $ (#content).load(loadLink,,hideLoader);? Do I have to replace hideLoader with a function that contains

[jQuery] Re: What is causing this error?

2008-12-21 Thread Rick Faircloth
Nope...I guess Google strips it out... -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Dave Methvin Sent: Sunday, December 21, 2008 3:43 PM To: jQuery (English) Subject: [jQuery] Re: What is causing this error? Did

[jQuery] Spammer bypassing JQ Validate to register?

2008-12-21 Thread Chuck Cheeze
I have a site built in ExpressionEngine. I am using JQ Validate to check the form fields before submission. There are 3 fields in particular that are interesting to me as they are required by EE and they are on the list of fields required by JQ Validate. First Name Last Name Invitation Code

[jQuery] How to get parts of URL after domain

2008-12-21 Thread Wonder95
Im sure this is easy to do, but I can't figure it out for some reason. I'm writing a simple little function in Drupal (in script.js in my theme) to display a different banner image (as a background for an element) based on the URL. So, for instance, if the URL is http://www.mysite.com/services,

[jQuery] Re: Spammer bypassing JQ Validate to register?

2008-12-21 Thread Dave Methvin
Client side validation is just there to provide a nicer experience for humans. If there are conditions that you need to enforce for the sake of your server-side code or database, then you must do that in your server-side code. Nothing stops a hacker from doing a raw submit to your server-side

[jQuery] Re: Spammer bypassing JQ Validate to register?

2008-12-21 Thread Dan G. Switzer, II
So, this dude from Poland managed to register without a first name, without a last name and likely without an invitation code. I'll deal with the EE issues separately, but is there a known issue where someone can mess with the jquery in the page to bypass the validation that is running? As

[jQuery] Re: How to get parts of URL after domain

2008-12-21 Thread ripple
I'm not sure what happened there with my multiple replies.   Sorry   --- On Sun, 12/21/08, Wonder95 killsho...@gmail.com wrote: From: Wonder95 killsho...@gmail.com Subject: [jQuery] How to get parts of URL after domain To: jQuery (English) jquery-en@googlegroups.com Date: Sunday, December 21,

[jQuery] Re: How to get parts of URL after domain

2008-12-21 Thread ripple
if (url.indexOf(services) 0) {   --- On Sun, 12/21/08, Wonder95 killsho...@gmail.com wrote: From: Wonder95 killsho...@gmail.com Subject: [jQuery] How to get parts of URL after domain To: jQuery (English) jquery-en@googlegroups.com Date: Sunday, December 21, 2008, 5:10 PM Im sure this is easy to

[jQuery] Re: How to get parts of URL after domain

2008-12-21 Thread ripple
if (url.indexOf(services) 0) { --- On Sun, 12/21/08, Wonder95 killsho...@gmail.com wrote: From: Wonder95 killsho...@gmail.com Subject: [jQuery] How to get parts of URL after domain To: jQuery (English) jquery-en@googlegroups.com Date: Sunday, December 21, 2008, 5:10 PM Im sure this is

[jQuery] Re: How can I write this function without hard-coding the input and error names?

2008-12-21 Thread Dave Methvin
Here's the code that I'd like to make flexible to handle all the input id's and error message id's.  How could I write it? Here's one way to do it: $('#street_number, #street_name, #city').blur(function(){ $(this.id.replace(/_/g, '-')+'-error') [this.value.length? 'fadeOut' :

[jQuery] Order of hiding container-divs and their content matters on IE6,7

2008-12-21 Thread Paul
In IE, when having elements containing other elements, ie. a div containing images, when attempting to hide a content-element of a hidden container-div, this won't work, it won't even be possible anymore after re-showing the div. This problem occurs: - only on IE6,7 (didn't try IE8), the problem

[jQuery] Re: Order of hiding container-divs and their content matters on IE6,7

2008-12-21 Thread ripple
How about posting your code?         http://2whoa.com/dominate --- On Sun, 12/21/08, Paul o.p.go...@gmail.com wrote: From: Paul o.p.go...@gmail.com Subject: [jQuery] Order of hiding container-divs and their content matters on IE6,7 To: jQuery (English) jquery-en@googlegroups.com Date: Sunday,

[jQuery] Re: How to get parts of URL after domain

2008-12-21 Thread ripple
Why not get the url and test it?   if (url.indexOf(services) 0) {  do this } else if (url.indexOf(about-us) 0) {  do this } That's one way to do it.     http://2whoa.com/dominate     --- On Sun, 12/21/08, Wonder95 killsho...@gmail.com wrote: From: Wonder95 killsho...@gmail.com Subject:

[jQuery] Re: How to get parts of URL after domain

2008-12-21 Thread Michael Geary
I would think it would make more sense to do this in PHP instead of JavaScript. You can use PHP code in your Drupal theme. If you want to do it in JavaScript, you don't need jQuery, regular expressions, or indexOf. window.location (or just location) has several properties that give you different

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Michael Geary
jQuery is just JavaScript code. As such, it isn't capable of crashing your PC on its own. And it runs fine on much older PCs than yours. Also, what kind of crash are you talking about? A blue screen? A frozen system but not a blue screen? Or what? Something else much be very wrong with your

[jQuery] Re: Can I access and change content loaded dynamically after jQuery.js?

2008-12-21 Thread Ricardo Tomasi
If you add the event handlers to the callback you can get it working: $(#content).load(loadLink, function(){ hideLoader(); $('.details').hide(); $('.showDetails').click(function() { $('.details').slideToggle('slow'); return false; }); }) On Dec 21, 4:20 pm, suntrop

[jQuery] Re: problem with :contains in 'td'

2008-12-21 Thread Ricardo Tomasi
On Dec 20, 10:31 pm, chinnak chinnakarup...@gmail.com wrote: Thanks a lot ricardo..         $(':contains(History)','tr').css(background-color,red); (WORKS) One thing I understood was :contains uses the context to search in it children.not in the same element.becoz when I use 'td' as the

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Magnificent
The monitor goes black (like a loss of signal), then either nothing, or sometimes it reboots on its own. It only happens when executing jQuery code and I've yet to get a single crash in Opera on the same pages testing the same code. I've never had this problem in Firefox before, either. On Dec

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Ricardo Tomasi
Something wrong with your windows or FF install for sure. There is nothing special in the way jQuery does animations compared to any other JS scripts. I use FF on an AMD 2.0ghz with 1gb RAM very often and never have any crashes. - ricardo On Dec 21, 12:39 am, Magnificent

[jQuery] Re: How to get parts of URL after domain

2008-12-21 Thread Ricardo Tomasi
Wow. Had never seen that construct, very efficient. Learning something new everyday :) cheers, - ricardo On Dec 21, 10:46 pm, Michael Geary m...@mg.to wrote: I would think it would make more sense to do this in PHP instead of JavaScript. You can use PHP code in your Drupal theme. If you

[jQuery] Re: Order of hiding container-divs and their content matters on IE6,7

2008-12-21 Thread Ricardo Tomasi
He just did. Why not read it? On Dec 21, 10:19 pm, ripple ripple...@yahoo.com wrote: How about posting your code?        http://2whoa.com/dominate --- On Sun, 12/21/08, Paul o.p.go...@gmail.com wrote: From: Paul o.p.go...@gmail.com Subject: [jQuery] Order of hiding container-divs and

[jQuery] Re: Order of hiding container-divs and their content matters on IE6,7

2008-12-21 Thread Ricardo Tomasi
Very interesting, it's definitely a IE rendering bug. display:none is actually set, and the elements are not affecting layout, but still visible. Setting visibility:hidden seems to do the job. I guess there's nothing that can be done on jQuery's side, as this affects only this specific case and

[jQuery] Re: problem in removing and moving

2008-12-21 Thread Jack Finger
Thanks to Dave Methvin, it runs. I didn't try Kean's solution, because David's was simpler, but thanks too. And I have one more question: fieldset id=div dl dd...something.../dd /dl dl dd...something.../dd /dl ... ... ... /fieldset JS: if(previous dl == first dl) - how can I check if

[jQuery] Re: problem in removing and moving

2008-12-21 Thread Jack Finger
Thanks to Dave Methvin, it runs. I didn't try Kean's solution, Dave's was simpler. And I have one more question: HTML: fieldset id=div dl dd...something.../dd /dl dl dd...something.../dd /dl ... ... ... ... /fieldset JS: if(previous dl is first dl){ ...} else { ... } - how can I write the

[jQuery] [autocomplete] country selection add-on

2008-12-21 Thread Marc-Antoine Ross
Hi, I just posted an add-on for the excellent jQuery autocomplete plugin. I am looking for feedback on it. http://www.devtaxi.com/2008/12/21/country-jquery-autocomplete-plugin/ Regards

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Magnificent
What gets me is I've never had this problem with FF before and when it crashes, it's ALWAYS executing jQuery code via a click handler. No problems whatsoever in Opera. On Dec 21, 5:19 pm, Ricardo Tomasi ricardob...@gmail.com wrote: Something wrong with your windows or FF install for sure.

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Michael Geary
I don't question the symptoms that you're seeing, but trust me: jQuery may be triggering the problem, but it isn't *causing* it. jQuery, and JavaScript in general, simply doesn't have the kind of system access needed to cause a crash of this sort. It has to be something along the lines I

[jQuery] Re: Order of hiding container-divs and their content matters on IE6,7

2008-12-21 Thread ripple
He said that was a demonstration/example. He didn't say that it's his code.   --- On Sun, 12/21/08, Ricardo Tomasi ricardob...@gmail.com wrote: From: Ricardo Tomasi ricardob...@gmail.com Subject: [jQuery] Re: Order of hiding container-divs and their content matters on IE6,7 To: jQuery

[jQuery] Re: [validate] ie6 runtime errors

2008-12-21 Thread Sean Allen
On Dec 21, 2008, at 11:26 AM, DumpsterDoggy wrote: First glance, it looks like your first script tag's src attribute is incorrect: script type=text/javascript src=//ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js/script that makes no difference to the error one way or