Re: [jQuery] jQuery and Jack Slocum's Ext
Wow - this is fantastic news! Great to see those two libs somewhat merge together and possibly also boost the communities around these projects. :) John Resig wrote: Hi Everyone - Today, we're proud to announce that the jQuery Project and Jack Slocum's Ext Project, have partnered to integrate the amazingly lightweight and powerful jQuery framework with Ext's awesome UI library. This collaboration will greatly enhance the capabilities of both projects and expand the functionality available to developers using the jQuery JavaScript Library and the Ext UI component suite. --snip-- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Very long input text value and focus
Hi Roberto, I'm a bit in a hurry without much time for testing this but you can try to get and then again set the selection. Just use my plugin to accomplish this: http://laboratorium.0xab.cd/jquery/fieldselection/0.2.3-test/ If this doesn't work, try it like this: Get the selection range, store it, position the cursor to the end and then re-set the stored range. Alex Roberto Ortelli wrote: Hello, I don't know how to do that in JS or in JQuery, here is the problem: Imagine 2 or 3 text fields of a form. A long value text is displayed in each field. The text is too long and when I put a focus on a field I did not see the cursor. How can I automatically display the end of the text when I focus it? Hoping is clear... thanks in advance -- Roberto ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Cursor position inside of textfield / textarea?
Hello Jonathan, as Karl and Jörn already pointed out, at the time I'm coding a plugin which handles all the selection stuff inside an input field / a textarea. The latest Version also includes setSelection. More information can be found in this thread: http://www.nabble.com/plugin%3A-fieldSelection-tf2833491.html Please note: The plugin is relatively new and I have the feeling that some of the API may change in the near future as I already got some suggestions on how to improve the plugin. :) Also I have to write some documentation... Alex Jonathan Sharp wrote: Is it possible to get the current cursor offset in a text field? For example Hello world if the cursor is between the H and e could I somehow get the offset of 1? -js ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] plugin: fieldSelection
Hi John, many, many thanks for your ideas! So maybe you are interested in the latest version where I implemented the cursor to new text suggestion. Just pass true to replaceSelection() as a second parameter. Or maybe it should be the default? The latest testing version is is 0.2.1, but please note, it is not very well tested in Opera and Safari. Also there are known IE quirks! http://laboratorium.0xab.cd/jquery/fieldselection/ Also new is setSelection() which.. let's you set a field selection. :) But please note: although it basically works, I for sure have to rewrite the arguments stuff which is way too hackish. But what I wanted to implement is stuff like this: setSelection([2, 5]) setSelection({start: 5, end: 'current'}) setSelection({pos: 5}) setSelection('$') // cursor to end I also want to implement things like select word under cursor and similar things. And I thought about optionally passing a function e.g. to intercept replaceSelection(). This way you could easily implement stuff like additionally wrap spaces around the inserted text, but only if there are non surrounding, if you know what I mean. So.. am I moving it into the right direction? :) Alex John Resig wrote: Ok, this is really really impressive. Every time that I have to deal with text-field selection, I'm constantly banging my head against the keyboard. This is a fantastic plugin to have on hand. Some quick suggestions: - When you replace a snippet, the cursor loses focus. It would be fantastic if the new replaced snippet was selected too. Like so: foo [bar] baz becomes: foo [zoo] baz (where [] is the selection) - In the object that you return, including two other properties: before (The text before the current selection) and after (the text after the current selection) - Make it so that you can bind a .selection() event (or some such) so that you can have a method be called back every time the selection changes, for example: $(...).selection(function(e,s){ alert( s.text ); }); (This would only have to fire whenever the selection is complete) This is a great plugin - I can't wait to use it! (Especially considering that it works great in IE, Safari and Firefox!) --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Plugin Rewrite: Accordion
Jörn Zaefferer wrote: Hi folks, instead of pointing Frank what he could change on his code, I gave it a try for myself. You can see the result, yet badly documented, here: http://www.joern.jquery.com/accordion/accordion.html The behaviour should be exactly the same as the original. Is this worthy to put it in the jQuery plugin repository? Hi Jörn, with Firefox 1.5.0.7 on Windows I see some display bugs concerning the height of the sub elements. In the 1st example the height of the third element and in the 2nd example the second and third element grows out of its box at the bottom. No problems seem to appear on Firefox (DeerPark) 1.5.0.6 on my Mac. Alex ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin update: autoheight, effects
Same overflow problem with the 3rd tab here using Firefox 1.5.0.6 and Windows XP. But no probs in Firefox 1.5.0.6 on my Mac. Greetings, Alex Klaus Hartl wrote: This looks exactly like an issue with the height calculation of hidden elements John and I thought we had resolved. I don't have a Win 2000 handy right now, I will have a look into it on the weekend... I really wonder, whats the difference between Firefox on Win 2000 and XP! Regards, Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Download Cheat Sheet, one page , printable, quick refrence, Jquery
Nilesh Patel wrote: How about this Cheat Sheet I made, based off visual jquery.. Hello Nilesh, thanks for the sheet, I really like it. About the 2nd/back page: I think this would be great. Maybe also with some tricks and/or often used idioms (which would IMHO be a great help for beginners of jQuery). Greets, Alex ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/