[jQuery] missing keydown/keyup

2007-12-14 Thread Mateusz Misiorny
Hi, What I am trying to do, is figure out if there was a change in the input field, so I want compare the value of the field before and after a keypress. And it works, but not when I type fast. Then the browser is just losing some events. This shows the problem:

[jQuery] preferred method for controlling a plugin from outside

2007-11-05 Thread Mateusz Misiorny
Hi, I need to control my accordion from "outside", i.e. I need to be able to open a specific part on some event. I have came up with this: jQuery.fn.accordion = function () { this.find('dd:not(:first)').hide(); return this.each(function() { $(this).childre

[jQuery] Re: ruby style string manipulation

2007-07-27 Thread Mateusz Misiorny
You could also do sth like this: String.prototype.templatize = function(values) { return this.replace(/{\$([^}]+)}/g, function (full_match, group_match) { return values[group_match]; }); } and use it like this: var tpl = "Flight {$

[jQuery] Re: JS regular expressions for matching decimal numbers

2007-06-12 Thread Mateusz Misiorny
What about something like this: "100.12".match(/\d+(?:\.\d+)?/) HTH, Matt On 6/12/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: Hi, has anybody some regular expressions at hand that work in JS to match decimal numbers, eg. 100, 100.4 or 100,120.124 Thanks for sharing. -- Jörn Zaefferer h