[jQuery] Re: text box keeps focus when another element type is clicked ?

2008-06-09 Thread paulj
Wizzud Thank you *very* much. Your solution works fine. Paul On 8 Jun, 08:47, Wizzud [EMAIL PROTECTED] wrote: Try adding... $(':text').bind('focus', function(){ hasFocus = $(this); }); On Jun 5, 7:43 pm, paulj [EMAIL PROTECTED] wrote: Wizzud, thank you for your help. Your code

[jQuery] Re: text box keeps focus when another element type is clicked ?

2008-06-05 Thread paulj
); if(ev != hasFocus){ if (ev.is(':text')){ hasFocus = ev; } hasFocus.focus(); } }); }); On Jun 5, 2:30 am, paulj [EMAIL PROTECTED] wrote: Hi, When a text box has the focus, I would like it to keep the focus even when another element type (not another

[jQuery] text box keeps focus when another element type is clicked ?

2008-06-04 Thread paulj
Hi, When a text box has the focus, I would like it to keep the focus even when another element type (not another text box) is clicked. eg after clicking this other element type, the user can press a key(s) and the text box will accept this key input without the user having to click back into the

[jQuery] Re: $('*').not(':text').click(function() { $(':text').eq(2).focus() } ) ; wrong syntax?

2008-05-27 Thread paulj
it. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 26, 2008, at 5:52 PM, paulj wrote:

[jQuery] Re: get index number of 'in focus' text box

2008-02-24 Thread paulj
# + index); }); }); Apologies for not checking things out properly. Paul On 22 Feb, 23:12, paulj [EMAIL PROTECTED] wrote: As each text box gains the focus, I would like the index number of that text box to be displayed in a div. I tried to use the following but -1 was displayed each time

[jQuery] get index number of 'in focus' text box

2008-02-22 Thread paulj
As each text box gains the focus, I would like the index number of that text box to be displayed in a div. I tried to use the following but -1 was displayed each time. $(document).ready(function() { $('input:text').focus(function () { $('div').text( $(this).index());

[jQuery] Re: Updated API browser

2008-02-12 Thread paulj
Great work Remy! On 12 Feb, 22:56, Rey Bango [EMAIL PROTECTED] wrote: Remy, Can you make this downloadable so it can be run locally? Rey Hi all, Ever since jQuery 1.1.3 the old API browser hasn't been updated due to incompatibilities in the documentation (though that's mostly

[jQuery] getElementById('myTable').rows[1].cells[2] in jQuery?

2008-02-08 Thread paulj
In JavaScript, getElementById('myTable').rows[1].cells[2] would select the cell that is in 2nd row of the 3rd column. What is the jQ equivalent of this? (or maybe jQ has a different and better way of doing this?) This is some HTML markup using the JS method : html head script type =

[jQuery] Re: getElementById('myTable').rows[1].cells[2] in jQuery?

2008-02-08 Thread paulj
(function(){ $('#btn').click(function (){ alert($(#myTable tr:eq(1) td:eq(2)).html()); }); }); paulj wrote: In JavaScript, getElementById('myTable').rows[1].cells[2] would select the cell that is in 2nd row of the 3rd column. What is the jQ equivalent

[jQuery] Re: copy li values to an array

2008-02-05 Thread paulj
Jonathan and Karl : thanks for your replies. Jonathan : I probably gave the impression that I wanted each 3rd li value copied to each array element. Your code worked brilliantly for that and I've stored it away for another day. Karl: that's exactly what I wanted. Problem solved. (BTW I use your

[jQuery] Re: nested function problem?

2007-12-04 Thread paulj
Thanks, Wizzud. Your solution solved the problem. On 3 Dec, 23:15, Wizzud [EMAIL PROTECTED] wrote: Just considering the problem area, and assuming that you want a generic solution... for(var i = 0; iarray1.length; i+=2){ array2.push(array1[i] + (array1[i+1] || '')); } On Dec 3, 7:30