[jQuery] Attaching events to dynamic DOM IDs

2007-12-22 Thread Rabbit
The following code: for(var i = 0; i 30; i++) { jQuery('#day_' + i).click(function() { console.log('i is ' + i); jQuery('#day_' + i + '_modal').jqmShow(); }); } Runs, but always reports i is 30. Now, I understand why it does that, but why doesn't the jqmShow method work? It

[jQuery] Re: Attaching events to dynamic DOM IDs

2007-12-22 Thread Stefan Petre
for(var i = 0; i 30; i++) { jQuery('#day_' + i).click(function() { jQuery('#' + this.id+ '_modal').jqmShow(); }); } maybe it works this way 2007/12/22, Rabbit [EMAIL PROTECTED]: The following code: for(var i = 0; i 30; i++) { jQuery('#day_' + i).click(function() {

[jQuery] Re: Attaching events to dynamic DOM IDs

2007-12-22 Thread Michael Geary
As an alternative to the other solution you posted, here is how you can do it with code more like the code below: for(var i = 0; i 30; i++) clicker( i ); function clicker( i ) { jQuery('#day_' + i).click(function() { console.log('i is ' + i); jQuery('#day_' + i +

[jQuery] Re: Attaching events to dynamic DOM IDs

2007-12-22 Thread Rabbit
On Dec 22, 12:55 am, Michael Geary [EMAIL PROTECTED] wrote: By moving this code into a function, a new variable i is created each time the function is called. You no longer have all the code sharing a single variable - each instance of the function gets its own. Ah, brilliant. I see that

[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-22 Thread Erik Beeson
While returning false will stop the event from propagating, it will also prevent the default action from occurring, which isn't necessarily desirable. In this case it might not matter, but in general, event.stopPropagation() is the right way to stop the event from propagating. Returning false does

[jQuery] Re: jQueryish for Effect.CashRegister()

2007-12-22 Thread R. Rajesh Jeba Anbiah
On Dec 19, 5:53 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Glen Lipka put together something that was similar (but way cooler) a while ago. Glen, do you still have that somewhere on your site? snip Thanks for the info, but I still don't find it anywhere in http://www.commadot.com/jquery/

[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-22 Thread Shawn
Understood. I read the issue to be that when he clicked the link the row was highlighting. Whereas he wants to do something specific when the on the link click, but highlight the row when the row is clicked. In which case both click events need to be independant (i.e. end). The

[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-22 Thread McLars
You could use the hover() method, instead of the separate mouseover() and mouseout() methods. And you could also use the .toggleClass method instead of the addClass() and removeClass() methods. Larry On Dec 21, 4:55 pm, rolfsf [EMAIL PROTECTED] wrote: I've set up a simple action when a user

[jQuery] MSIE 7.0 and slide() function...

2007-12-22 Thread andrea varnier
Hi :) I'm working on my website, just to practice a bit with jquery. I have a problem here: http://www.andreavarnier.com/temp menu code is like this ul id=menu li id=herea href=index.htmlHome/a/li li class=open_suba href=#Musica/a

[jQuery] Re: Superfish menu extremely slow/clunky in IE6 with wordpress

2007-12-22 Thread Joel Birch
The HTML is created from your PHP files on the server, but by the time the browser sees it it will just be regular static HTML, so you you can just copy and paste from View Source and save it as a HTML file. If you can do that then the file should just run from the file system (ie. without a

[jQuery] Re: form submission and error messages: what's your approach?

2007-12-22 Thread Karl Swedberg
Hi jj, I think there are quite a number of reasonable approaches. Jörn's validation plugin can help quite a bit: http://jquery.com/plugins/project/validate Here is a simple contact form with some immediate feedback validation that Jonathan Chaffer and I put together for our book:

[jQuery] Re: Announcing jQuery HowTo's

2007-12-22 Thread Karl Swedberg
Hi Shawn, This sounds like it could be a terrific addition to the available jQuery resources. Thanks! --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Dec 21, 2007, at 2:50 AM, Shawn wrote: In a recent thread

[jQuery] Job offer - please ignore if not interested

2007-12-22 Thread paul
Hi, I'm working for a London, UK based internet startup and we're looking for talented javascript developers, remote working is fine please contact me for more details if interested. Thanks, Paul.

[jQuery] Re: Problems with clueTip

2007-12-22 Thread firstlor
Hello, first: thanks :) It doesn't work still ... it shows the tooltip without an title and with [Object object] as content ... in IE7 and IE6 it doesnt show any tooltip ... :( On 21 Dez., 19:31, Karl Swedberg [EMAIL PROTECTED] wrote: Hi firstlor, I think the problem in your situation might

[jQuery] Avoid double submit by disabling submit button causes problem in IE

2007-12-22 Thread psy*
Hello, I want to avoid double submitting, so I have the following code: $(function() { $(input[type='submit']).click(function() { $(input[type='submit']).attr('disabled', true); }); }); In FF, it works pretty nice, but in IE 6 and IE 7, the submit buttons gets

[jQuery] Problem with Cluetip and Link to delete

2007-12-22 Thread psy*
Hello, I have the following code: JS: $(document).ready(function() { $('a.help').cluetip({ cluetipClass: 'jtip', arrows: true, dropShadow: false, leftOffset: 20, fx: { open: 'fadeIn', openSpeed: '' }, local:

[jQuery] Re: Announcing jQuery HowTo's

2007-12-22 Thread McLars
The tips triicks I was thinking of would be of the short and sweet varietiy, where they could all be printed out on a page or two. For example, easier ways to select elements. The longer, more complicated stuff would be more suited to a blog, of course, like what Learning jQuery does. Larry

[jQuery] Question about the mailinglist

2007-12-22 Thread psy*
Hello, is it possible to receive only responds to questions that I asked in the mailinglist directly? thanks :)

[jQuery] jeditable - placeholder text insert when value is 0

2007-12-22 Thread ofer27
Placeholder text insert, regular, when element value is empty, but it's happens also, if the value is 0. Is it a bug? thanks.

[jQuery] Re: Problems with clueTip

2007-12-22 Thread Karl Swedberg
Do you have a page that I can look at? I'm not sure what the problem could be at this point. Have you seen the example (#6) on the demo page that uses local content? http://plugins.learningjquery.com/cluetip/demo/ A comparison of your attempt and the demo might help. I'd be happy to

[jQuery] Re: Attaching events to dynamic DOM IDs

2007-12-22 Thread Rabbit
Hmm... I didn't realize this until I was falling asleep last night, but what you've demonstrated is similar to a closure in Ruby, except not. My understanding of what you said is something along the lines of... An argument to a method becomes a local variable in that method and is _retained_.

[jQuery] Re: Avoid double submit by disabling submit button causes problem in IE

2007-12-22 Thread Wizzud
You could change the submit to a button and use one() ... For example... jQuery(function($){ $('input.submitbutton').one('click', function(){ $(this).parents('form')[0].submit(); return false; }); }); form input type='button' class='submitbutton' / /form

[jQuery] Re: Jquery Lightbox or Thickbox and Flickr?

2007-12-22 Thread bdee1
ok so i just dropped the code into a site template and it seems to work fine in IE but in firefox, it displays the gallery over and over again with weird layout. can youplease take a look? the url is http://beta.asset-guardians.com/portfolio.html http://beta.asset-guardians.com/portfolio.html

[jQuery] Re: Just can't seem to figure way...

2007-12-22 Thread Wizzud
Nothing wrong with the code in its own right ... BUT you have the exact same script included on your page twice so there are 2 click handlers bound to each 'dt a', which results in the double bounce! On Dec 22, 2:55 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can someone look at this code..

[jQuery] Re: Attaching events to dynamic DOM IDs

2007-12-22 Thread Michael Geary
In fact, it is a closure, and it works very much like closures in Ruby and other languages. Keep in mind that a JavaScript object is reference counted and remains in existence as long as there are any references to the object. Once there are no more references to an object, it becomes available

[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-22 Thread rolfsf
Thanks to both of you... when I get back at this later in the week I'm going to play with the various ideas and read up. I don't understand event bubbling, but have heard the term enough times that I should dig in a bit. The good (and bad) side of jquery is that I haven't had to really learn

[jQuery] Filter out innerhtml of div #id

2007-12-22 Thread psy*
Hello, I have a full html code in in a var: str = 'full html code here starting with html'; and now I want to get the innerHTML of a div with an certain id. I tried that: $(var_name).filter('div#content').get(0).html() but that doesn't work. What's the right way?? thanks!

[jQuery] replace missing image (onerror)

2007-12-22 Thread mark
I used to add an onerror even handler to img src tags to prevent images which do not show up. Is there a way to do this in Jquery?

[jQuery] Re: Avoid double submit by disabling submit button causes problem in IE

2007-12-22 Thread KnoxBaby
yeah that would probably work but it would be much nicer if I wouldn't have to do any changes in the html directly because there are really really many forms, any advise?? shall I first replace the submit button with such a button and than use your code or is this a rather dirty way to do it and

[jQuery] Re: MSIE 7.0 and slide() function...

2007-12-22 Thread ajma
Have you tried the Acordian control? It seems like that does what you want. On Dec 22, 1:52 am, andrea varnier [EMAIL PROTECTED] wrote: Hi :) I'm working on my website, just to practice a bit with jquery. I have a problem here:http://www.andreavarnier.com/temp menu code is like this      

[jQuery] $_POST variables not passed to PHP script processing form

2007-12-22 Thread Big Moxy
Ultimately I want this form to upload a file to a server location based on the additional form fields on the server. I started with sample code that I found querying jquery file upload. Originally echo.php contained two var_dump statements - one for $_POST and the other for $_FILES. That works

[jQuery] Re: Question about the mailinglist

2007-12-22 Thread KnoxBaby
I mean, I don't want to get only one mail a day or always, when somebody writes something but always, when somebody writes an answer to one of my topics :) On 22 Dez., 17:48, psy* [EMAIL PROTECTED] wrote: Hello, is it possible to receive only responds to questions that I asked in the

[jQuery] bind and unbind click event

2007-12-22 Thread pb734
I'm trying to add functionality that toggles an image on click event, inserts row into db and binds a new event which removes the row on click event. this works but i was wonder if there is a more elegant method: add_imgoing = function() { $(\'.add_imgoing\').click(function () { var

[jQuery] general unique id for new append element

2007-12-22 Thread dn2965
hello everyone i want to know a way to general unique id for new append element. like EXT's .id(); thanks~~