Re: [jQuery] New Plugin: modalContent

2006-11-28 Thread Brice Burgess


Gavin M. Roy wrote:
> 
> Putting my time where my mouth is in the "Stop using thickbox!" I've  
> created a "modalContent" plugin.
> 
> You can view it and a few examples at http://jquery.glyphix.com/
> 

Gavin,

  I agree that there needs to be a good, solid, and fast modal window
framework for jQ. I've run into many downsides with thickbox -- and would
like to see these avoided (or fixed!) in any work that goes into the modal
dialogs.

  For starters; i18n seems to be completely forgotten in these plugins
(thickbox certainly included). Plugins which take strings as parameters
(such as Kelvin Luck's datepicker & rikrikrik's quickseach) make l10n
efforts easy --  in my case I wrap a translation function around the strings
in the template that is spitting out the $(document).ready() Javascript.
Having to constantly mod plugins so that they take a variable string to fill
out all those "title", "alt", and link text atrributes they inject is no
fun!

  Secondly, when using inline content inside a modal window -- be sure to
preserve the event bindings if you're cloning the elements! It's kind of a
pain in the ass (for the SERVER!) to resort to using an ajax call to display
the content in order to preserve a form's customized submit event. When the
information is already available to display a form (such as fields looked up
from a database and made available to the template) it is plain inefficient
to make another request so that you can display the same form but preserve
any binding associated with it. See;
http://www.nabble.com/click-event-not-working---tf2612228.html#a7311920 for
clarity ;)

  Lastly, there's much work out there already done. Personally, I mucho
enjoy Thickbox's method of disabling the page (overlay) and center focusing
the modal window -- while still allowing you to scroll the page. This is
slick -- and Klaus has further enhanced it (and reduced TB size to @ 8k)
http://www.stilbuero.de/2006/11/06/a-smoother-thickbox-with-less-code/

  I'm sure there's other issues out there to be addressed -- like using CSS
to style the modal window's border ;) These are my pleas.

Thanks,

~ Brice
  



-- 
View this message in context: 
http://www.nabble.com/Stop-using-thickbox%21-tf2704990.html#a7594544
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Juha Suni
Peter Michaux wrote:
> The research I have done with dragdrop behavior is similar to the
> research going on here. Perhaps my blog posts can save you some time.
>

Heh amazing how similar methods we've ended up trying. Could have saved some 
time had I known about your research. Nice to see the results are pretty 
similar though. I believe the donught approach is a pretty good mix of 
performance and visuals. The only compromise being the small hole for the 
cursor. I think with a little tweaking it could be made to look 
aesthetically ok, though.

Thanks for the link.

-- 
Suni 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggable re-binding problem?

2006-11-28 Thread h3

On 11/27/06, Paul Findlay <[EMAIL PROTECTED]> wrote:


http://x-maru.org/draggable/test.html>Was there any success in solving

this? I am now having the same problem..

I wound up working around it. The result can be seen here:

http://x-maru.org/draggable/test2.html

In this working case, I back out a bit and destroy the element to which I
was binding Draggable altogether, then create it anew and attach anew as
well. It works then. I guess the problem is attaching to the same element
more than once- perhaps the DraggableDestroy method doesn't do what I
thought it would.

It was something I was hoping to avoid iin the actual app I'm working on,
but it wasn't too bad to do one additional layer of DOM fiddling.

-Harry
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] TableSorter textExtractionCustom

2006-11-28 Thread Mike Alsup
> How do I apply a regex function on that text?
> ..
> textExtractionCustom: {
> 1: function(o) {
> return $('span',o).val();
> },
> 2: function(o) {
> return $('span',o).val();
> }
> },

Do you want the text of the element?

$('span', o).text()

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] TableSorter textExtractionCustom

2006-11-28 Thread [EMAIL PROTECTED]
How do I apply the custom text extraction if I do not have the text 
wrapped in anything else than the regular td element?
How do I apply a regex function on that text?
..
textExtractionCustom: {
1: function(o) {
return $('span',o).val();
},
2: function(o) {
return $('span',o).val();
}
},
   ..

Also, if somebody (me included) couldn't figure out how to get the 
latest TableSorter from the SVN here's the link:
http://jquery.com/dev/svn/trunk/plugins/tablesorter/jquery.tablesorter.js?format=txt

Thanks.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Never ending using ThickBox ;)

2006-11-28 Thread Olaf Bosch
Dragan Krstic schrieb:
> Can you add some openig animation, or similar?

Yes, you cane do this ;)
Search in the jquery_box.js

$("#TBwindow").append("

and replace with

$("#TBwindow").fadeIn("slow").append("

or what ever you want

-- 
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] load() doesn't fire ajaxComplete()

2006-11-28 Thread Matt Grimm
Is there a good reason that the AJAX convenience function load() doesn't
fire the ajaxComplete method (and its friends)? It doesn't make sense to
me that only the $.ajax() method would fire ajaxComplete (et al) when
load() is an AJAX method too...

m.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form Select Help...

2006-11-28 Thread Mike Alsup
> > Hmm, defaultValue returns undefined but is that safe to use?
> >
> Dunno, but may solve the problem. If the value is empty and the
> defaultValue is undefined, return the text content as the value, for IE.

Unfortunately IE6 has an undefined 'defaultValue' for options with no
value attribute and for options that have a value of the empty string.
 And in both these cases the actual value resolves to have identity to
the empty string.  I have not figured out how to distinguish between
no value and an empty string value in IE.  So far, the lesson learned
is to always use the value attribute!

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Blair McKenzie

Or even better:
$("[EMAIL PROTECTED]'https:']").attr("target","_blank");

It's easy to go overboard with JS where its not really needed. :)

Another thing you may need to consider is that some browsers seem to return
the full url for the href attribute, even for relative links. You may want
to filter out your own domain with .not("[EMAIL PROTECTED]'yourdomain.com']").

Blair

On 11/29/06, MichaL Sanger <[EMAIL PROTECTED]> wrote:


I think one of greatest features of jQuery is support of XPath and
CSS3 selectors, so why to mess up code with each() and match()?
Use this nice way:
$("[EMAIL PROTECTED]'http:']").click(function(){
...
});

More about it:
http://jquery.com/docs/Base/Expression/XPath/
http://jquery.com/docs/Base/Expression/CSS/

MichaL

2006/11/28, Michael Holloway <[EMAIL PROTECTED]>:
> Hi Adam,
>
> Welcome to the community.
> I haven't tried this, but how about:
>
> // each a-tag
> $('a').each(function(){
> // if the url contains http or https we take it it's an external url
> if(this.href.match(/https?/)){
>// when the link is clicked, open a popup and stop the parent
> going anywhere
> $(this).click(function(){
> window.open(this.href);
> return false;
> });
> }
> });
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Never ending using ThickBox ;)

2006-11-28 Thread Dragan Krstic

Can you add some openig animation, or similar?


2006/11/28, Olaf Bosch <[EMAIL PROTECTED]>:


Gavin M. Roy schrieb:

> Putting my time where my mouth is in the "Stop using thickbox!" I've
>  created a "modalContent" plugin.

This is good, than look at my ;)

http://olaf-bosch.de/bugs/jquery/fileman/

I have just finished it, sorry is of german. I can read somewhat,
however, do not write so properly.
You can read the Code, than understand the Plugin.

The window-plugin have great potenzial, heads up Gilles

Just my $0.02 :)

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Dragan Krstić krdr
http://krdr.ebloggy.com/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: modalContent

2006-11-28 Thread Benjamin Sterling
I like it, but my window h and w is 987 x 808 and I only get the overlay
covering about 90% of my window and it adds scroll bars.  I can using FF 2
on a PC.  I checked ie6 and ie7 and looks good even if I resize window.

But this looks good and a nice file size.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gavin M. Roy
Sent: Tuesday, November 28, 2006 4:57 PM
To: jQuery Discussion.
Subject: [jQuery] New Plugin: modalContent

Putting my time where my mouth is in the "Stop using thickbox!" I've  
created a "modalContent" plugin.

You can view it and a few examples at http://jquery.glyphix.com/

As this is an initial revision, I'm sure I've not thought of  
everything.  This is meant to be a base modal content plugin that  
things like thickbox can be built upon.

Please let me know your thoughts.

Gavin

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Andy Matthews
I'm having the same issues.



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Christopher Jordan
  Sent: Tuesday, November 28, 2006 12:54 PM
  To: jQuery Discussion.
  Subject: [jQuery] OT: mail delivery


  Hi folks,

  I'm getting emails from the list sometimes very late. For instance, I just
now received an email that was apparently sent by the poster at 5:30 this
morning. What I'm trying to figure out is, if it's just me (and thus, likely
a problem with my email server), or if anyone else is having this problem.

  It's rather annoying, as I often see responses to posts that I haven't
actually gotten yet, and since some folks crop out all but the relevant
piece they're responding to, I have to wait until I get the original post to
see the whole picture.

  So... is this just happening to me? :o)

  Cheers,
  Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: modalContent

2006-11-28 Thread Gavin M. Roy
Thanks, I've fixed that, added an animation parameter and incremented  
the version.


On Nov 28, 2006, at 2:11 PM, Laurent Yaish wrote:


Hi Gavin,

Looks pretty neat and simple. I haven't really gone through the  
code but the one
think I noticed is that you're using the $ alias. Plugins should be  
using jQuery not the alias.


Laurent

On 11/28/06, Gavin M. Roy <[EMAIL PROTECTED]> wrote:
Putting my time where my mouth is in the "Stop using thickbox!" I've
created a "modalContent" plugin.

You can view it and a few examples at http://jquery.glyphix.com/

As this is an initial revision, I'm sure I've not thought of
everything.  This is meant to be a base modal content plugin that
things like thickbox can be built upon.

Please let me know your thoughts.

Gavin

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-28 Thread Mike Alsup
> On your comment on degration, I am not sure my window plugin needs to
> degrade, after all, you have to open it from Javascript and it is a
> javascript build and controlled box... That's just my opinion, since i
> don't see how i could degrade this... It is either javascript on or off
> with this plugin.

Gilles,

The way to make it degrade is to build it off the markup like many of
the other plugins.  They take existing markup and transform it into
something else.  I don't see why your window plugin couldn't do the
same thing.  Just a thought.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Never ending using ThickBox ;)

2006-11-28 Thread Olaf Bosch
Gavin M. Roy schrieb:

> Putting my time where my mouth is in the "Stop using thickbox!" I've
>  created a "modalContent" plugin.

This is good, than look at my ;)

http://olaf-bosch.de/bugs/jquery/fileman/

I have just finished it, sorry is of german. I can read somewhat,
however, do not write so properly.
You can read the Code, than understand the Plugin.

The window-plugin have great potenzial, heads up Gilles

Just my $0.02 :)

-- 
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: modalContent

2006-11-28 Thread Laurent Yaish

Hi Gavin,

Looks pretty neat and simple. I haven't really gone through the code but the
one
think I noticed is that you're using the $ alias. Plugins should be using
jQuery not the alias.

Laurent

On 11/28/06, Gavin M. Roy <[EMAIL PROTECTED]> wrote:


Putting my time where my mouth is in the "Stop using thickbox!" I've
created a "modalContent" plugin.

You can view it and a few examples at http://jquery.glyphix.com/

As this is an initial revision, I'm sure I've not thought of
everything.  This is meant to be a base modal content plugin that
things like thickbox can be built upon.

Please let me know your thoughts.

Gavin

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] $.each for iterating arrays not working?

2006-11-28 Thread Felix Geisendörfer
Hm thanks for confirming that. What's weird is that this is gone if I do 
this.toString(), then it correctly recognizes the variable. Anyway I 
still love the firebug (<- no pun intended), it's an awesome little tool 
; ).


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Jörn Zaefferer wrote:
I'm very confused. I'm trying to iterate through the elements of an 
array by using the jQuery.each() function. Take a look at the code below:


$.each(['vendors', 'models', 'views'], function()
{
console.log(this, typeof(this));
});

I would expect firebug to produce an output like this:

"vendors" "string"
"models" "string"
"views" string"

Instead I get this:

["v","e","n","d","o","r","s"] "object"
["m","o","d","e","l","s"] "object"
["v","i","e","w","s"] "object"

Which is why I am confused. Those objects look like arrays in the 
console, but when trying this.join('') to convert them into a string 
again I get the error that this function is not defined, indication 
that those this objects are in fact no arrays but something else. 
However using alert(this) will make them look as if they were strings.


Have I gone crazy? Is there a bug in firebug? Or am I just incredibly 
stupid?


I'd appreciate any form of help, regardless of eventual truths about 
the state my sanity ; ).

To my experience this strange behaviour is a firebug (<- pun intended). 
Ahem, a firebug bug. Firebug thinks your String is an array (it has a 
length property) and therefore prints it as an array, though it does 
that only in special cases.


  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] New Plugin: modalContent

2006-11-28 Thread Gavin M. Roy
Putting my time where my mouth is in the "Stop using thickbox!" I've  
created a "modalContent" plugin.

You can view it and a few examples at http://jquery.glyphix.com/

As this is an initial revision, I'm sure I've not thought of  
everything.  This is meant to be a base modal content plugin that  
things like thickbox can be built upon.

Please let me know your thoughts.

Gavin

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ThickBox Wow

2006-11-28 Thread Erik Beeson

This was JUST posted on this list last week. It's very nice.

--Erik

On 11/28/06, Glen Lipka <[EMAIL PROTECTED]> wrote:


Check this out:
http://vikjavev.no/highslide/

Click on the images.  You can drag and drop the popup!
The zoom is awesome!

Glen

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] How can this not work? (Safari Problem)

2006-11-28 Thread Subway

Hi,

Have a look at this code:

function showfeedinfos(feedid){
$.get("getfeedinfo.php", {feedid: feedid}, function(feedinfo) {
$("#f_item_"+feedid+" 
.feedinfo").hide().html(feedinfo).slideDown("slow");
deblur();
});
}

On every browser I've tested, this works without any problems, just in
Safari not, it just doesen't show anything. It actualy reaches the inside of
the function, but for some reason it doesn't fill the div with the loaded
content (the variable feedinfo has the content as an alert test revealed).
This is the html where the extra info is loaded into (I just removed the
rest of the info that's in there):


...



...



It's from my first jQuery project: http://www.osxcode.com/feedsearch/

Funny thing is that if I change the id="f_item_47" part to class="f_item_47"
and the jQuery part to a class as well, than it works in Safari, but with a
very big lag, so not really a solution I want to use.

Any ideas?

Fredi
-- 
View this message in context: 
http://www.nabble.com/How-can-this-not-work--%28Safari-Problem%29-tf2721195.html#a7588434
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] ThickBox Wow

2006-11-28 Thread Glen Lipka

Check this out:
http://vikjavev.no/highslide/

Click on the images.  You can drag and drop the popup!
The zoom is awesome!

Glen
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] find table cell by text inside

2006-11-28 Thread smeranda

That worked great, thanks!



Giuliano Marcangelo wrote:
> 
> $("#SomeID td").contains("sometext").addClass("someClass");
> 
> On 28/11/06, smeranda <[EMAIL PROTECTED]> wrote:
>>
>>
>> How do I use jquery to find a particular table cell based of the text
>> inside
>> the cell and add a .css class to the table cell?
>> --
>> View this message in context:
>> http://www.nabble.com/find-table-cell-by-text-inside-tf2720766.html#a7587041
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/find-table-cell-by-text-inside-tf2720766.html#a7588178
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread John Resig
> Then again, it could be a combination of both. Who hosts the list? What's
> it's connection like?

I host the list along with the web site - every once in a while I
manage to kill the server, causing the list to freak out (I'm not a
sysadmin). Things should be pretty stable for now (hopefully).

--John

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-28 Thread Webunity | Gilles van den Hoven
Dan Atkinson wrote:
> Going by the title, I fear that this is more wishful thinking and showmanship
> than anything else.
>   
Hi Dan,

Correct. I wasn't trying to be arrogant, on the contrary, i just wanted 
to "poke" around to see how people reacted on my plugin. I've tried this 
before with the email is sent titled "new plugin: Window", but i only 
received about 3 reactions on that, and i felt disapointed since i've 
put so much work in it, perfecting it (in my eyes). The mail with this 
title received some critisism, but also gave me some new ideas to work 
with, something i ran out of and that is all i ever wanted.

To be honest, the last time i looked at thickbox it was only capable of 
showing 1 image, and not (like it is now) capable of doing much more. :s 
(sigh!)

On your comment on degration, I am not sure my window plugin needs to 
degrade, after all, you have to open it from Javascript and it is a 
javascript build and controlled box... That's just my opinion, since i 
don't see how i could degrade this... It is either javascript on or off 
with this plugin.

I'm hoping to get the community's thoughts on how i can improve this 
dialog, so people can implement this on their own CMS/website whatever 
use they feel for it. I think the reason the dragging is kinda slow, is 
the entire discussion going on about the best way to create the 
draggables for interface, so i hope that get's solved pretty quick.

Since all i wanted to create (show off) with this plugin that it is 
possible to create a OS like dialog very easy (without those nasty popup 
blockers), maybe it's better to find a way to combine both plugins??

Anyway, i hope i didn't sound to arrogant, i was also a bit pissed on 
ajaxian.com constantly bragging on about ruby, prototype, scriptaculous, 
moo, YUI and forgetting all about jquery

Hoping on a response,

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Christopher Jordan



 If you want gmail, you need an invite. I have a
few invitations left.

do you still need an invite for gmail? I didn't think that was the case 
anymore.

...
I just checked, you get an invite by giving them your cell phone number 
and they respond with a text message that contains an invite.


"To sign up, enter your mobile phone number below. We'll send you a text 
message with an invitation code to create your account. If you've 
already received a code, skip to step two 
!"


You're right though, I am using my companies mail server, and we're a 
small company (like nine employees including the owner).
We host our email on a Fedora 4 box running QMail (configured for 
virtual domains). We're connected to the backbone with a T1 from 
Southwestern Bell.


I guess it could just be me. :o(

Then again, it could be a combination of both. Who hosts the list? 
What's it's connection like?
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Passed data inconsistency between $.ajax and $.post

2006-11-28 Thread Jörn Zaefferer
Brice Burgess schrieb:
>   Thanks (as always) for the information. For some silly reason I'm 
> using 1.0.3 rev 501! ;)
>   
Heh, you never know what new bugs may have been introduced in the trunk 
revision ;-)

While you are at it, check out the inline docs for $.ajax. There were 
quite a few changes, if you find any typos or else, let me know.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] find table cell by text inside

2006-11-28 Thread Jörn Zaefferer
smeranda schrieb:
> How do I use jquery to find a particular table cell based of the text inside
> the cell and add a .css class to the table cell?
>   
Try this:
$("#mytable td").filter(".someclass").contains("sometext");
In short:
$("#mytable td.someclass").contains("sometext");

If you have a big table and "#mytable td" selects to many elements, try 
to give more context information, like the row (tr), eg. $("#mytable 
tr:first td.someclass")

I hope that helps.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Peter Michaux
Hi,

Paul Bakaus wrote:
I had a long conversation with Stefan today (the guy who started the
wonderful Interface library, for those of you who are new) about the
performance of drag and drop operations.
There are different approaches for both scriptaculous and interface and
real-life applications:

I'm not a JQuery users but Brandon Aarron alerted me to this thread by
email. I replied to him and am pasting most of that email below in
hopes that it is useful to you.

The research I have done with dragdrop behavior is similar to the
research going on here. Perhaps my blog posts can save you some time.

Regards,
Peter


Sometime today I hope my DNS will be hooked up and the first release
of my new OSS JavaScript library called "Fork" will be available to
the world. Fork is like Yahoo! UI but I'm striving for lighter, higher
quality code and the Ajax library has the necessary tricks for Rails
REST. With the release of Fork, now I'll be at the wrong end of the
shooting range :)

Watch later today or tomorrow . . .

http://forkjavascript.org

Until that is up, if you want to checkout the entire Fork website
written with Rails

svn co http://dev.michaux.ca/svn/fork/trunk

or just the Fork code

svn co http://dev.michaux.ca/svn/fork/trunk/public/javascripts/fork

Fork has the MIT license and includes my drag library components that
I previously released and explained

http://peter.michaux.ca/article/51

Note that code in that blog post a little older than the version in
the Fork svn but the explainations of ideas are the same still. The
Fork repository doesnt have the most exciting examples of drag
behavior yet but I've used earlier versions of the Fork drag library
to make a file manager like Windows Explorer and also a one page app
like OS X Dashboard both for high traffic sites.

I know my drag library is the fastest and most flexible by design
compared to all the libraries I've tried. It is a new and different
idea in how to build a drag library.

I'll have a new blog post as soon as the Fork domain is up and running.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] find table cell by text inside

2006-11-28 Thread Giuliano Marcangelo

$("#SomeID td").contains("sometext").addClass("someClass");

On 28/11/06, smeranda <[EMAIL PROTECTED]> wrote:



How do I use jquery to find a particular table cell based of the text
inside
the cell and add a .css class to the table cell?
--
View this message in context:
http://www.nabble.com/find-table-cell-by-text-inside-tf2720766.html#a7587041
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Ⓙⓐⓚⓔ

perhaps they arrived in the wrong order but,  the simple threads keep topics
together, and it's nice to know that while you are responding to a topic,
new mail has come in on the same thread!

On 11/28/06, Paul McLanahan <[EMAIL PROTECTED]> wrote:


I use gmail as well, but I've gotten some out of order before.  I
think the server has some off days from time to time.

On 11/28/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> I use gmail, and have never gotten mail out of order. the reason you get
> them out of order is the nature of the SMTP network. I bet you are all
on
> smaller isps or companies. If you want gmail, you need an invite. I have
a
> few invitations left.
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] find table cell by text inside

2006-11-28 Thread smeranda

How do I use jquery to find a particular table cell based of the text inside
the cell and add a .css class to the table cell?
-- 
View this message in context: 
http://www.nabble.com/find-table-cell-by-text-inside-tf2720766.html#a7587041
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-28 Thread Rey Bango
> Eh, I think Gilles was just having fun and not trying to be arrogant. 

Thats the way I interpreted it (just having fun).

Rey...

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Paul McLanahan
I use gmail as well, but I've gotten some out of order before.  I
think the server has some off days from time to time.

On 11/28/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> I use gmail, and have never gotten mail out of order. the reason you get
> them out of order is the nature of the SMTP network. I bet you are all on
> smaller isps or companies. If you want gmail, you need an invite. I have a
> few invitations left.
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-28 Thread Christopher Jordan

Dan Atkinson wrote:
> If you do release another version, I would maybe suggest a little less
> arrogance on your part, ...
Eh, I think Gilles was just having fun and not trying to be arrogant. 
For cryin' out-loud, that's what the damned emoticons were created for, 
in the first place.
I think those folks who considered his post arrogant just missed the 
smiley at the end of the sentence. Maybe he could have included a J/K or 
something to better indicate it. I dunno, I just hate seeing the guy 
dragged over the coals because he was trying to poke a little fun.  :o(

Of course, I guess I could be wrong, but I don't think I am. Anyway, 
that's a bit OT, I suppose. :o)

Cheers,
Chris

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .css works not correct for me

2006-11-28 Thread Ⓙⓐⓚⓔ

it's textAlign!

On 11/28/06, Christof Donat <[EMAIL PROTECTED]> wrote:


Hi,

> Hi @all,
> i will a DIV appand to ID test and give test a little bit of CSS, this
> works fine
>
> $("#test").css({overflow:"hidden"}).append("
> This fails:
>
> $("#test").css({text-align:"center"}).append("
> what is to do?

$("#test").css({"text-align":"center"}).append("http://jquery.com/discuss/





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .css works not correct for me

2006-11-28 Thread Jörn Zaefferer
Olaf Bosch schrieb:
> Hi @all,
> i will a DIV appand to ID test and give test a little bit of CSS, this 
> works fine
>
> $("#test").css({overflow:"hidden"}).append("
> This fails:
>
> $("#test").css({text-align:"center"}).append("
> what is to do?
>   
A dash is illegal in a javascript identifier. In other words, use one of 
these:
css("text-align", "center")
css({"text-align": "center"})
css({textAlign: "center"})

That should do it.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form Select Help...

2006-11-28 Thread Jörn Zaefferer
Mike Alsup schrieb:
>> Have you checked what getAttribute returns? Or maybe "defaultValue"?
>> 
>
> Hmm, defaultValue returns undefined but is that safe to use?
>   
Dunno, but may solve the problem. If the value is empty and the 
defaultValue is undefined, return the text content as the value, for IE.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .css works not correct for me

2006-11-28 Thread Olaf Bosch
Christof Donat schrieb:

> $("#test").css({"text-align":"center"}).append(" 
> The '-' is interpreted as an operator when it is used outside of a string. 

Ahh, thank you, work


-- 
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Passed data inconsistency between $.ajax and $.post

2006-11-28 Thread Brice Burgess
Jörn Zaefferer wrote:
>> I have noticed that $.ajax does not take a hash object for it's data 
>> parameter like it's cousin $.post.
>>
>> [...]
>>
>> I see from the docs that $.ajax() takes a STRING for data (in HTTP GET 
>> fashion).
>>
>> Will future versions of $.ajax() also accept an object (to serialize) as 
>> $.post() does? I think it'd be nice for consistency.
>> 
>
> That is already included in the latest revision. The conversion from object s 
> to query strings is applied inside of $.ajax now.
>   
Hey Jörn!

  Thanks (as always) for the information. For some silly reason I'm 
using 1.0.3 rev 501! ;)

Cheers,

~ Brice



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] TableEditor: Flexible In Place editing of HTML Tables

2006-11-28 Thread Brice Burgess
Web Specialist wrote:
> Very nice. Do you have a link to download JS code and PHP code?
>
> Cheers.
The JS code is available @ 
http://dev.iceburg.net/jquery/tableEditor/demo.php under the FILES 
section. The validation library, however, is not a part of this plugin 
and can be found @ http://dev.iceburg.net/jquery/tableEditor/validate.js 
 Tables are vanilla 
HTML tables, as can be seen when viewing the source of any of the 
examples. I don't have any example PHP code demonstrating the 
fulfillment of an AJAX update on a row or the parsing of the datasource 
into a HTML table. I'll include this in the next update.

Thanks,

~ Brice

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-28 Thread Dan Atkinson

Going by the title, I fear that this is more wishful thinking and showmanship
than anything else.

This may sound quite arrogant, but then, so is your summary of thickbox.

I'm afraid that the complete lack of graceful degradation means that this is
one plugin I simply cannot use.

I do like the styling though, and the use of tables is forgiveable, even if
the purists would insist that tables are for data only.

Best of luck with the next version!

If you do release another version, I would maybe suggest a little less
arrogance on your part, which will likely ensure a much better reception,
than the less-than-cordial response which was received by this. Alas, I
think this would also attract fewer responses from the community! :-)


Webunity | Gilles van den Hoven wrote:
> 
> And use my window plugin :)
> 
> Why?
> 
> Thickbox was made for images
> Window plugin was made for popups (dialogs)
> 
> Just my $0.02
> 
> -- Gilles
> 
> http://gilles.jquery.com/window/
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Stop-using-thickbox%21-tf2704990.html#a7586419
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Christof Donat
Hi,

> Well... I did notice the same thing with a mail I sent to the list a few
> days ago. Arrived in my inbox approx 8 hours after I sent it.

Me too.

Christof

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .css works not correct for me

2006-11-28 Thread Christof Donat
Hi,

> Hi @all,
> i will a DIV appand to ID test and give test a little bit of CSS, this
> works fine
>
> $("#test").css({overflow:"hidden"}).append("
> This fails:
>
> $("#test").css({text-align:"center"}).append("
> what is to do?

$("#test").css({"text-align":"center"}).append("http://jquery.com/discuss/


Re: [jQuery] TableEditor: Flexible In Place editing of HTML Tables

2006-11-28 Thread Brice Burgess
Isaac Cambron wrote:
> I think it's cool and very useful.
>
> One thing it could use is a cancel option.
Isaac,

  I agree. I've been thinking of an elegant way to do this. Perhaps 
clone the "event link" element, update its innerHTML (as is done already 
when toggling between edit+save) to include cancel text/image and float 
it to the left of the save button?

  Maybe better yet would be to bind a cancel event the the Esc key, and 
notify the user of this binding by displaying a tooltip when they hover 
over the save link?

  Regardless... This will be implemented.

~ Brice

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] .css works not correct for me

2006-11-28 Thread Olaf Bosch
Hi @all,
i will a DIV appand to ID test and give test a little bit of CSS, this 
works fine

$("#test").css({overflow:"hidden"}).append("http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Ⓙⓐⓚⓔ

I use gmail, and have never gotten mail out of order. the reason you get
them out of order is the nature of the SMTP network. I bet you are all on
smaller isps or companies. If you want gmail, you need an invite. I have a
few invitations left.

--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Christopher Jordan
Yeah, I've had that happen too. Still is it the list server, or the 
poster's email server. Hard to tell I suppose. I just figured if enough 
people were experiencing the same sorts of problems, that maybe it was 
the list server. It does, after all, get hammered from time to time 
because this is such an active list. :o/


Chris

Barry Nauta wrote:
Well... I did notice the same thing with a mail I sent to the list a 
few days ago. Arrived in my inbox approx 8 hours after I sent it.



*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of *Christopher Jordan
*Sent:* 28 November 2006 19:54
*To:* jQuery Discussion.
*Subject:* [jQuery] OT: mail delivery

Hi folks,

I'm getting emails from the list sometimes very late. For
instance, I just now received an email that was apparently sent by
the poster at 5:30 this morning. What I'm trying to figure out is,
if it's just me (and thus, likely a problem with my email server),
or if anyone else is having this problem.

It's rather annoying, as I often see responses to posts that I
haven't actually gotten yet, and since some folks crop out all but
the relevant piece they're responding to, I have to wait until I
get the original post to see the whole picture.

So... is this just happening to me? :o)

Cheers,
Chris



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-28 Thread Barry Nauta
Well... I did notice the same thing with a mail I sent to the list a few
days ago. Arrived in my inbox approx 8 hours after I sent it.




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christopher Jordan
Sent: 28 November 2006 19:54
To: jQuery Discussion.
Subject: [jQuery] OT: mail delivery


Hi folks,

I'm getting emails from the list sometimes very late. For
instance, I just now received an email that was apparently sent by the
poster at 5:30 this morning. What I'm trying to figure out is, if it's
just me (and thus, likely a problem with my email server), or if anyone
else is having this problem.

It's rather annoying, as I often see responses to posts that I
haven't actually gotten yet, and since some folks crop out all but the
relevant piece they're responding to, I have to wait until I get the
original post to see the whole picture.

So... is this just happening to me? :o)

Cheers,
Chris


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form Select Help...

2006-11-28 Thread Mike Alsup
> Have you checked what getAttribute returns? Or maybe "defaultValue"?

Hmm, defaultValue returns undefined but is that safe to use?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi,

> > You can not be shure that a JavaScript Engine is not threaded. This code
> > is not threadsave.
>
> Is there an implementation of javascript that supports context switching?

The engine itsself usually does no contextswitch, but it may start multiple 
threads to handle multiple Events simultanuously. These threads then can be 
stoped by the OS and another thread of the JS-engine can run.

I am not shure if the Firefox JS-Engine is single-threaded. I am pretty shure 
that the engines in IE and Konqueror are, but I have no clue about Opera. 
Anyway there is no promise that this will never change.

Christof

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi,

> Yes, but if it's not 0 it's ok I guess.

I have not analyzed your code deeply. It was just something I sumbled across. 

> There is a preprocessing step that 
> sets parse2RE, and if it's not 0 isn't it safe to suppose it holds the
> correct RegExp object set during preprocessing?

Ah, I understand. That was the point I was missing when I read your code :-)

Christof

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form Select Help...

2006-11-28 Thread Jörn Zaefferer

> This problem also arises when using the form plugin.  I thought it
> would be easy to fix but it turns out that IE resolves options without
> values to have a value identical to the empty string.  That is, if
> there is not a value attribute on the option element the following is
> true in IE:
>
> value === ""
>
> and so is this:
>
> $(...).attr('value') === ""
>
> That is really unfortunate.  If often use an empty string as the
> value, like this:
>
> ALL
>
> and in that case I want the empty string posted, not the "ALL" text.
> Programatically there doesn't seem to be a way to tell them apart in
> IE.  Anyone have any ideas?
>   
Have you checked what getAttribute returns? Or maybe "defaultValue"?

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] OT: mail delivery

2006-11-28 Thread Christopher Jordan

Hi folks,

I'm getting emails from the list sometimes very late. For instance, I 
just now received an email that was apparently sent by the poster at 
5:30 this morning. What I'm trying to figure out is, if it's just me 
(and thus, likely a problem with my email server), or if anyone else is 
having this problem.


It's rather annoying, as I often see responses to posts that I haven't 
actually gotten yet, and since some folks crop out all but the relevant 
piece they're responding to, I have to wait until I get the original 
post to see the whole picture.


So... is this just happening to me? :o)

Cheers,
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] TableEditor: Flexible In Place editing of HTML Tables (with tableSorter support)

2006-11-28 Thread Alex Cook
I dig what you're doing here.  The style does suck, but the code is
solid as far as I can tell.  I have aspirations to use this soon but I
haven't yet.  Once I do I'll throw you some more detailed comments.

-ALEX

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Brice Burgess
Sent: Tuesday, November 28, 2006 2:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] TableEditor: Flexible In Place editing of HTML
Tables (with tableSorter support)

I've updated the in place table editing plugin available @ 
http://dev.iceburg.net/jquery/tableEditor/demo.php

The changes include;

A) Performance improvements and HTML element bugfixes

B) /column class inheritance on row cells (example added to plugin
page

C) Marking columns as "no edit" (example in apply class)

D) Ability to restore row to its original values (example included).

Besides the ugly as hell styling, I feel that this plugin is about done.

I'd still like better integration to tableSorter (waiting on 
responses).. but am more concerned about the code quality & methods 
used. If anyone could look over the code & provide comments I'd be more 
than appreciative. It would be nice to add the tableEditor to the jQ 
plugin SVN repository if there's enough interest.

Does anyone find this plugin useful?

Thanks!

~ Brice

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Andrea Ercolino


Christof Donat wrote:
> 
> You can not be shure that a JavaScript Engine is not threaded. This code
> is 
> not threadsave. Imagine the following situation:
> 
> Thread 1Thread 2
> $.filter()
> parse2RE is set to e.g. 1
> Thread is stopped by OS Sceduler -> $.filter()
> jQuery.parse2RE != 0 !!
> 

Yes, but if it's not 0 it's ok I guess. There is a preprocessing step that
sets parse2RE, and if it's not 0 isn't it safe to suppose it holds the
correct RegExp object set during preprocessing?

-- 
View this message in context: 
http://www.nabble.com/filter-refactored-with-the-engine-of-Chili-tf2718426.html#a7584966
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Paul Bakaus

Hi again Suni,

I had the same idea a couple of weeks before actually, but I didn't continue
my work because I noticed it would become even worse than the current
Interface implementation.

Imagine you change/add/remove a drop target later on, or you change drop
targets during the drag: You always have to recall the cloning. Also,
cloning is not faster than measuring out I think. Try to stick it to
dragstart if you want.

2006/11/28, Juha Suni <[EMAIL PROTECTED]>:


 Here goes with another approach. This preserves the original draggable
with no need for a helper, but still allows using event.target for all its
goodness. Might need a bit more coding to implement this in interface, but
at least it seems to work pretty well in this another proof of concept. As
before, only Firefox tested. Making browser compatible should not be a
hassle once the concept is working.

Instead of fooling around with the helper we keep the original draggable
but either on drag start or on document load clone the droppables, place
them over themselves, and give the new clones a class that gives them a
higher z-index and an opacity of 0.

Therefore the original droppables stay at bottom (lowest z-index), the
draggable happily drags over them, but the draggable itself stays below the
invisible droppable-clones, that provide us with event.target. From there
we can go on targetting the actual droppables as needed pretty easily.

The only drawbacks I would see is if it takes too much performance to
clone the droppables, or to calculate dimensions and to place them correctly
on the view. Clones also need not be real copies, could always be just
invisible divs. This would need further testing. My test here with 160
droppables (positioned absolutely, makes this test easier and causes less
strain, I suppose) however performs really well and there is only a
miniscule delay at document load.

This is in a way pretty similar as the interface's 1) approach, but could
be a lot faster with absolutely positioned elements, and there might be a
way to exploit this with other types of elements too.

Test it out here:

http://www.sparecom.fi/test/test.php

Im not totally happy about this yet, though. Have to dig in deeper with
more time.

In the end, I start to agree that it might be better to provide at least 2
modes for the draggables to function in, depending on the amount of
droppables.

--
Suni



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/






--
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form Select Help...

2006-11-28 Thread Mike Alsup
> Need help in displaying the selected value on a select in a
> formbelow is the code which return nothing/empty.

This problem also arises when using the form plugin.  I thought it
would be easy to fix but it turns out that IE resolves options without
values to have a value identical to the empty string.  That is, if
there is not a value attribute on the option element the following is
true in IE:

value === ""

and so is this:

$(...).attr('value') === ""

That is really unfortunate.  If often use an empty string as the
value, like this:

ALL

and in that case I want the empty string posted, not the "ALL" text.
Programatically there doesn't seem to be a way to tell them apart in
IE.  Anyone have any ideas?

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Mike Alsup
> You can not be shure that a JavaScript Engine is not threaded. This code is
> not threadsave.

Is there an implementation of javascript that supports context switching?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New plugin: del.icio.us like text grow

2006-11-28 Thread Erik Beeson

This looks really nice, but how is it different from the one in Interface?

http://interface.eyecon.ro/demos/expander.html

--Erik

On 11/28/06, Remy Sharp <[EMAIL PROTECTED]> wrote:



Hi,

I've written a plugin that matches the automatic text box growth
functionality in the tag search on del.icio.us.

http://leftlogic.com/info/articles/auto_grow_text

It can read CSS styling to control the min and max width of the input box.

Let me know what you think, or if you spot any bugs.

Thanks,

Remy Sharp.
--
View this message in context:
http://www.nabble.com/New-plugin%3A-del.icio.us-like-text-grow-tf2717821.html#a7577611
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil
@ Brandon Aaron <[EMAIL PROTECTED]> :
> Bug report: http://jquery.com/dev/bugs/bug/446/

Thanks for being so fast Brandon :)

-- Fil


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] New plugin: del.icio.us like text grow

2006-11-28 Thread Remy Sharp

Hi,

I've written a plugin that matches the automatic text box growth
functionality in the tag search on del.icio.us.

http://leftlogic.com/info/articles/auto_grow_text

It can read CSS styling to control the min and max width of the input box.

Let me know what you think, or if you spot any bugs.

Thanks,

Remy Sharp.
-- 
View this message in context: 
http://www.nabble.com/New-plugin%3A-del.icio.us-like-text-grow-tf2717821.html#a7577611
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Renato Formato
Andrea Ercolino ha scritto:
> 
> Fil wrote:
>> I agree, but it's really grep that we want to do here, in my opinion.
>>
> 
> The call to filter inside the loop is already grepping... ultimately.
> 
> BTW: could someone explain how does it work this mechanism, where a function
> has two declarations, like filter, and each is properly called? How are they
> differentiated?
> 
The one declared in jQuery.fn = jQuery.prototype is for new instances of 
the jQuery object.

Called by $("p").filter()

The other is declared for the starting jQuery object, let's say the 
constructor object.

Used internally and called by jQuery.filter()

I know I have not used the correct words, but i can't explain better :)

Renato


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi

>   if( jQuery.parse2RE == 0 ) { 
>   // this is the first call to filter_opt, so
>   // replace S and T macros in the parse2 regexps
>   var S = "([a-z*_-][\\w-]*)";

You can not be shure that a JavaScript Engine is not threaded. This code is 
not threadsave. Imagine the following situation:

Thread 1Thread 2
$.filter()
parse2RE is set to e.g. 1
Thread is stopped by OS Sceduler -> $.filter()
jQuery.parse2RE != 0 !!

That kind of problems is very problematic, because they are timing-dependant 
and may or may not occur on each run. Maybe you can find a way to use an 
additional Parameter for that.

Christof

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Reading comments from the dom.

2006-11-28 Thread Jörn Zaefferer
Ⓙⓐⓚⓔ schrieb:
> I'm glad you noticed the connection... I was working on some 

Re: [jQuery] $.each for iterating arrays not working?

2006-11-28 Thread Jörn Zaefferer

> I'm very confused. I'm trying to iterate through the elements of an 
> array by using the jQuery.each() function. Take a look at the code below:
>
> $.each(['vendors', 'models', 'views'], function()
> {
> console.log(this, typeof(this));
> });
>
> I would expect firebug to produce an output like this:
>
> "vendors" "string"
> "models" "string"
> "views" string"
>
> Instead I get this:
>
> ["v","e","n","d","o","r","s"] "object"
> ["m","o","d","e","l","s"] "object"
> ["v","i","e","w","s"] "object"
>
> Which is why I am confused. Those objects look like arrays in the 
> console, but when trying this.join('') to convert them into a string 
> again I get the error that this function is not defined, indication 
> that those this objects are in fact no arrays but something else. 
> However using alert(this) will make them look as if they were strings.
>
> Have I gone crazy? Is there a bug in firebug? Or am I just incredibly 
> stupid?
>
> I'd appreciate any form of help, regardless of eventual truths about 
> the state my sanity ; ).
To my experience this strange behaviour is a firebug (<- pun intended). 
Ahem, a firebug bug. Firebug thinks your String is an array (it has a 
length property) and therefore prints it as an array, though it does 
that only in special cases.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Lite build not working for plugins?

2006-11-28 Thread Jörn Zaefferer
Mike Alsup schrieb:
> Anybody have the lite build working for plugins?  When I include
> plugins in my lite build the javadocs are not stripped (but they are
> >from core).  The min and pack builds seem to work just fine.  lite.js
> looks like it should work but it doesn't (for me).
>   
That may be the newline issue we had before. There may be one or more 
plugin files that contain windows-based newline characters which make 
the min build fail (docs too).

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] appendTo and tbody

2006-11-28 Thread Dave Methvin

> appendTo is appending my tbody groups inside an
> extra tbody tag which seems to be created by the
> appendTo(). This seems wrong. Anyone have any ideas?

It was bugged a while back. It looks like there needs to be another check
for inserting tbody as well as thead.

http://jquery.com/dev/bugs/bug/418/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] appendTo and tbody

2006-11-28 Thread Brandon Aaron
This is related to: http://jquery.com/dev/bugs/bug/418/

--
Brandon Aaron

On 11/28/06, Jamie Halmick <[EMAIL PROTECTED]> wrote:
> I'm using some sort code I found on the mailing list to sort a table. I can't 
> use tablesorter because I have groups of heterogeneous rows grouped with 
> tbody tags. Anyway, the code seems to be working well except that the 
> appendTo is appending my tbody groups inside an extra tbody tag which seems 
> to be created by the appendTo(). This seems wrong. Anyone have any ideas?
>
> Here's my sort code:
>
> // jQuery sort plugin functionality
> jQuery.fn.sort = function() {
>   return this.pushStack( [].sort.apply( this, arguments ), []);
> };
>
> function sortByName(){
> $('#maintable > tbody').sort(function(a,b){
> return $('.fullname', a).text() > $('.fullname', b).text() ? 1 : 
> -1;
> }).remove().appendTo('#maintable');
> }
>
> HTML is as follows to start:
>
> 
> 
> 
> Name
> ID
> Email
> 
> 
> 
> 
> John Doe
> 12345
> [EMAIL PROTECTED]
> 
> 
> 
> 
> Header 1Header 
> 2
> Data 1Data 
> 2
> Data 1Data 
> 2
> 
> 
> 
> 
> 
> 
> William Jones
> 32456
> [EMAIL PROTECTED]
> 
> 
> 
> 
> Header 1Header 
> 2
> Data 1Data 
> 2
> Data 1Data 
> 2
> 
> 
> 
> 
> 
>
> Afer I run the sort (notice the surrounding tbody tag) it is like:
>
> 
> 
> 
> Name
> ID
> Email
> 
> 
> 
> 
> 
> William Jones
> 32456
> [EMAIL PROTECTED]
> 
> 
> 
> 
> Header 1Header 
> 2
> Data 1Data 
> 2
> Data 1Data 
> 2
> 
> 
> 
> 
> 
> 
> John Doe
> 12345
> [EMAIL PROTECTED]
> 
> 
> 
> 
> Header 1Header 
> 2
> Data 1Data 
> 2
> Data 1Data 
> 2
> 
> 
> 
> 
> 
> 
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Andrea Ercolino


Fil wrote:
> 
> I agree, but it's really grep that we want to do here, in my opinion.
> 

The call to filter inside the loop is already grepping... ultimately.

BTW: could someone explain how does it work this mechanism, where a function
has two declarations, like filter, and each is properly called? How are they
differentiated?

-- 
View this message in context: 
http://www.nabble.com/.filter%28array%29-bug%2C-and-patch-tf2718768.html#a7583743
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Juha Suni
Here goes with another approach. This preserves the original draggable with no 
need for a helper, but still allows using event.target for all its goodness. 
Might need a bit more coding to implement this in interface, but at least it 
seems to work pretty well in this another proof of concept. As before, only 
Firefox tested. Making browser compatible should not be a hassle once the 
concept is working.

Instead of fooling around with the helper we keep the original draggable but 
either on drag start or on document load clone the droppables, place them over 
themselves, and give the new clones a class that gives them a higher z-index 
and an opacity of 0.

Therefore the original droppables stay at bottom (lowest z-index), the 
draggable happily drags over them, but the draggable itself stays below the 
invisible droppable-clones, that provide us with event.target. From there we 
can go on targetting the actual droppables as needed pretty easily.

The only drawbacks I would see is if it takes too much performance to clone the 
droppables, or to calculate dimensions and to place them correctly on the view. 
Clones also need not be real copies, could always be just invisible divs. This 
would need further testing. My test here with 160 droppables (positioned 
absolutely, makes this test easier and causes less strain, I suppose) however 
performs really well and there is only a miniscule delay at document load. 

This is in a way pretty similar as the interface's 1) approach, but could be a 
lot faster with absolutely positioned elements, and there might be a way to 
exploit this with other types of elements too.

Test it out here:

http://www.sparecom.fi/test/test.php

Im not totally happy about this yet, though. Have to dig in deeper with more 
time.

In the end, I start to agree that it might be better to provide at least 2 
modes for the draggables to function in, depending on the amount of droppables.

-- 
Suni

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] appendTo and tbody

2006-11-28 Thread Jamie Halmick
I've found a fix for now

at line 241 in jquery.js:

if ( !tbody.length ) {
obj = document.createElement("tbody");
this.appendChild( obj );
} else
obj = tbody[0];

If I comment that code out then my previously posted code works fine and the 
extra tbody is not created. Seems like a bug to assume that I'm not inserting 
tbody into an empty table.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Andrea Ercolino

http://jquery.com/dev/bugs/bug/447/

-- 
View this message in context: 
http://www.nabble.com/filter-refactored-with-the-engine-of-Chili-tf2718426.html#a7583601
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] appendTo and tbody

2006-11-28 Thread Jamie Halmick
I'm using some sort code I found on the mailing list to sort a table. I can't 
use tablesorter because I have groups of heterogeneous rows grouped with tbody 
tags. Anyway, the code seems to be working well except that the appendTo is 
appending my tbody groups inside an extra tbody tag which seems to be created 
by the appendTo(). This seems wrong. Anyone have any ideas?

Here's my sort code:

// jQuery sort plugin functionality
jQuery.fn.sort = function() {
  return this.pushStack( [].sort.apply( this, arguments ), []);
};

function sortByName(){
$('#maintable > tbody').sort(function(a,b){
return $('.fullname', a).text() > $('.fullname', b).text() ? 1 : -1;
}).remove().appendTo('#maintable');
}

HTML is as follows to start:




Name
ID
Email




John Doe
12345
[EMAIL PROTECTED]




Header 1Header 
2
Data 1Data 2
Data 1Data 2






William Jones
32456
[EMAIL PROTECTED]




Header 1Header 
2
Data 1Data 2
Data 1Data 2






Afer I run the sort (notice the surrounding tbody tag) it is like:




Name
ID
Email





William Jones
32456
[EMAIL PROTECTED]




Header 1Header 
2
Data 1Data 2
Data 1Data 2






John Doe
12345
[EMAIL PROTECTED]




Header 1Header 
2
Data 1Data 2
Data 1Data 2








___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Brandon Aaron
Bug report: http://jquery.com/dev/bugs/bug/446/

--
Brandon Aaron

On 11/28/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote:
> > > however the bug is only visible in a complex script, and within th
> > Firebug
> > > Inspector (but I can assure you it breaks my script), and I was not able
> > to
> > > write a simple test... so you might prefer to ignore me :)
> >
> > So this is in the case an element of $("h1") does not match any selector.
> >
> > The same error appears if you change the selector to:
> >
> > $("h1").filter([".one", ".nomatch"]).css("background", "red");
> >
> > Now, it breaks when a selector does not match any element of $("h1").
> >
> > In both cases the patch clears the issue
>
> Could you please post this as a bug report?
>
> I wonder if the filter(Array) method is really useful, why not just 
> use this:
> $("h1").filter(".one, .nomatch").css("background", "red");
> Should be pretty much the same.
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Dave Methvin
> When testing, keep in mind that browsers behaviour 
> with href attributes is quite inconsistent. While some
> return only the value as found in the markup, others
> add the domain and protocol. 

Right, IE usually adds the base href to relative URLs. I think this would
work in all browsers:

 $("[EMAIL PROTECTED]")
   .not("[EMAIL PROTECTED]'internal.com/']")
   .bind("click", "!window.open(this.href)");

That's the short (and a hair slower) form of this:

 $("[EMAIL PROTECTED]")
   .not("[EMAIL PROTECTED]'internal.com/']")
   .bind("click", function(){
   return !window.open(this.href);
   });

By applying the not (!) operator to window.open it returns false to stop the
default action only if the window opens; if a popup blocker intervenes,
window.open returns null and the click handler will return true to allow the
default action--following the link. 

Theoretically, .not("[EMAIL PROTECTED]'internal.com/']") could incorrectly 
match some
non-local URLs if  "internal.com/" was outside the domain name; it shouldn't
be in the query string because "/" should be encoded there. So it seems
pretty safe to use this.

Another approach would be to define a target attribute on the external links
and the browser will open them in a new tab or window:

 $("[EMAIL PROTECTED]")
   .not("[EMAIL PROTECTED]'internal.com/']")
   .attr("target", "_blank");



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Change href of external links

2006-11-28 Thread Michael Holloway
Woah, that's pretty tight. Nice one.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil

I agree, but it's really grep that we want to do here, in my opinion.
Either way, it will be fixed :)

Someone mentioned .filter(".one,.two"), but it has exactly the same bug.


@ Andrea Ercolino <[EMAIL PROTECTED]> :
> 
> the fix is much simpler:
> 
> t.constructor == Array &&
> jQuery.map(this,function(a){
>   for ( var i = 0; i < t.length; i++ )
>   if ( jQuery.filter(t[i],[a]).r.length )
>   return a;
> - return false;
> + return null;
> }) ||
> 
> I've tested with coreTest.js and your example and it works.
> 
> -- 
> View this message in context: 
> http://www.nabble.com/.filter%28array%29-bug%2C-and-patch-tf2718768.html#a7582383
> Sent from the JQuery mailing list archive at Nabble.com.
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

-- Fil


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Juha Suni
One more thing I forgot to mention earlier.

When I did the initial test I first played around with having just a 1px space 
(a hole, if you will, on the helper) at cursor location, but this didn't really 
work since the mouse (and therefore event.target) would overlap the helper, 
especially with rapid movements. Therefore I left a bufferzone by only creating 
borders for the helper and not getting too close to the mouse pointer. A few px 
might be enough, although I used more like 50. I don't know if there is a way 
to move the objects first before grabbing an updated event.target, or something 
similar.

The proof was more aimed at a helper that provides the outlines, borders, of 
the element being dragged, not visually cloning the entire element.

I'm confident there is a clean way to utilize event.target in the picking 
targets for dropping -process, since performance-wise it feels like the best 
way by far, especially with a larger number of droppables. Too bad the browsers 
dont provide an array of event targets so we could bubble and pick the one we 
want when the elements are on top of each other.

But I just had another idea, posting followup...

-- 
Suni
  - Original Message - 
  From: Paul Bakaus 
  To: jQuery Discussion. 
  Sent: Tuesday, November 28, 2006 6:12 PM
  Subject: Re: [jQuery] Interface Draggables/Droppables: New approach


  Juha, this is not a bad idea, but quite difficult if you have a difficult 
structured object.

  For example, my helper is a table with three columns all with a different 
background. Your way would be slicing the helper and having a one px space 
where my cursor is. Very interesting indeed, but also needs performance because 
of this: 

  1.) on drag start, you have to clone the object 4 times and wrap a div around 
every object.
  2.) then set the outer div to overflow: hidden and resize each of them like a 
puzzle around the cursor
  3.) Then move every 4 along with the cursor 

  I will test it, we'll see!


  2006/11/28, Juha Suni <[EMAIL PROTECTED]>:
Considering option 3 and the disadvantage of the cursor not being able to 
be on top of the helper:

Have you guys considered ways to go around this. Since #3 seems like the 
fastest, you might want to look for little tricks.

I quickly crunched together a small proof-of-concept showing that you can 
get the effect of the cursor being on top of the helper while still accessing 
the elements below through event.target. Yes, technically there is no 
helper-element under the cursor, but a few surrounding it giving the same 
effect. Although at first it might seem a little hackish, the code isn't that 
much, and even my glue-and-gum proof-of-concept seems to work ok. At least it 
should scale nicely since it doesn't really care about the amount of droppables.

It shouldn't be too hard to add some background color / image stuff to the 
"helper" if more visuals are needed.

Oh, and this is 100% only Firefox-tested and coded, to see if this is 
feasible at all. Will propably explode with any other browser, currently.

Check it out at: http://www.sparecom.fi/test/

-- 
Suni

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/






  -- 
  Paul Bakaus
  Web Developer
  
  Hildastr. 35
  79102 Freiburg 


--


  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Sam Collett
On 28/11/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote:
> > Hopefully when jQuery 1.1 is out it would mean you don't have to do
> > this and you can stick with event.pageX/Y and event.target.
>
> event.target is already normalized in the latest jQuery revision. It would b 
> easy to add the normalization for pageX/Y, too, if that is useful. If so, 
> could you add a bug ticket?
> --

Added bug ticket as I think this could be useful
http://jquery.com/dev/bugs/bug/445/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Andrea Ercolino

the fix is much simpler:

t.constructor == Array &&
jQuery.map(this,function(a){
for ( var i = 0; i < t.length; i++ )
if ( jQuery.filter(t[i],[a]).r.length )
return a;
-   return false;
+   return null;
}) ||

I've tested with coreTest.js and your example and it works.

-- 
View this message in context: 
http://www.nabble.com/.filter%28array%29-bug%2C-and-patch-tf2718768.html#a7582383
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Paul Bakaus

Juha, this is not a bad idea, but quite difficult if you have a difficult
structured object.

For example, my helper is a table with three columns all with a different
background. Your way would be slicing the helper and having a one px space
where my cursor is. Very interesting indeed, but also needs performance
because of this:

1.) on drag start, you have to clone the object 4 times and wrap a div
around every object.
2.) then set the outer div to overflow: hidden and resize each of them like
a puzzle around the cursor
3.) Then move every 4 along with the cursor

I will test it, we'll see!

2006/11/28, Juha Suni <[EMAIL PROTECTED]>:


 Considering option 3 and the disadvantage of the cursor not being able to
be on top of the helper:

Have you guys considered ways to go around this. Since #3 seems like the
fastest, you might want to look for little tricks.

I quickly crunched together a small proof-of-concept showing that you can
get the effect of the cursor being on top of the helper while still
accessing the elements below through event.target. Yes, technically there
is no helper-element under the cursor, but a few surrounding it giving the
same effect. Although at first it might seem a little hackish, the code
isn't that much, and even my glue-and-gum proof-of-concept seems to work ok.
At least it should scale nicely since it doesn't really care about the
amount of droppables.

It shouldn't be too hard to add some background color / image stuff to the
"helper" if more visuals are needed.

Oh, and this is 100% only Firefox-tested and coded, to see if this is
feasible at all. Will propably explode with any other browser, currently.

Check it out at: http://www.sparecom.fi/test/

--
Suni

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/






--
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] $.each for iterating arrays not working?

2006-11-28 Thread Felix Geisendörfer

Hi folks,

I'm very confused. I'm trying to iterate through the elements of an 
array by using the jQuery.each() function. Take a look at the code below:


$.each(['vendors', 'models', 'views'], function()
{
   console.log(this, typeof(this));
});

I would expect firebug to produce an output like this:

"vendors" "string"
"models" "string"
"views" string"

Instead I get this:

["v","e","n","d","o","r","s"] "object"
["m","o","d","e","l","s"] "object"
["v","i","e","w","s"] "object"

Which is why I am confused. Those objects look like arrays in the 
console, but when trying this.join('') to convert them into a string 
again I get the error that this function is not defined, indication that 
those this objects are in fact no arrays but something else. However 
using alert(this) will make them look as if they were strings.


Have I gone crazy? Is there a bug in firebug? Or am I just incredibly 
stupid?


I'd appreciate any form of help, regardless of eventual truths about the 
state my sanity ; ).


-- Felix Geisendörfer aka the_undefined
--
--
http://www.thinkingphp.org
http://www.fg-webdesign.de
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Paul McLanahan
For further clarification, here's some sample (untested mock up) code
that is a jQuery version of something I did a while back:

allowedDomains = ['mydomain.com','myotherdomain.net'];
$('[EMAIL PROTECTED]"http"]').each(function(){
var isExt = true;
for(var i=0;i-1){
isExt=false;
break;
}
}
if(isExt){  
$(this).click(function(){
window.open(this.href);
return false;
});
}
});

That way you can set up whatever strings you want to allow to be
excluded in the allowedDomains array thus ensuring that the links you
find really are external to your site's domain(s).

On 11/28/06, Paul McLanahan <[EMAIL PROTECTED]> wrote:
> Actually, you have to check for href attribs that start with "http"
> but then make sure that they're not "http://yourdomain.com"; because IE
> will translate relative links into absolute ones in the returned
> string from aTagRef.href. I'd also make sure that they don't start
> with "javascript:" and "mailto:";.
>
> On 11/28/06, Sam Collett <[EMAIL PROTECTED]> wrote:
> > On 28/11/06, agent2026 <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi all,
> > >
> > > New to jQuery, and I'm trying to use it to set my external links to open a
> > > new window without using any attributes to  mark the external links.  I 
> > > can
> > > do this with regular js, using a.href.match, but I can't get it to work 
> > > with
> > > jQuery.  Tried various directions, but no go.
> > >
> > > Sure I'll feel pretty stupid when this is answered, but here is my ugly,
> > > non-functioning code:
> > >
> > > $(function(){
> > > if ($!("a").href.match("http://www.internal.com";)) {
> > > $("a").click(
> > >  function() {
> > >  window.open(this.href); return false;
> > >  console.log("external");
> > >  };
> > > );
> > > };
> > > });
> > >
> > >
> > >
> > > Thanks for any help,
> > > Adam
> > > --
> >
> > This may work (untested), grabs all anchors that don't begin with http
> > (internal links should be referred to using '../../foo.html' or
> > '/bar.jpg'):
> >
> > $("a").not("[EMAIL PROTECTED]").click(
> > function(){
> > window.open(this.href);
> > console.log('external');
> > return false;
> > }
> > )
> >
> > $("a:[EMAIL PROTECTED]") may also work.
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Sam Collett
On 28/11/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote:
> > > however the bug is only visible in a complex script, and within th
> > Firebug
> > > Inspector (but I can assure you it breaks my script), and I was not able
> > to
> > > write a simple test... so you might prefer to ignore me :)
> >
> > So this is in the case an element of $("h1") does not match any selector.
> >
> > The same error appears if you change the selector to:
> >
> > $("h1").filter([".one", ".nomatch"]).css("background", "red");
> >
> > Now, it breaks when a selector does not match any element of $("h1").
> >
> > In both cases the patch clears the issue
>
> Could you please post this as a bug report?
>
> I wonder if the filter(Array) method is really useful, why not just 
> use this:
> $("h1").filter(".one, .nomatch").css("background", "red");
> Should be pretty much the same.

Couldn't filter still take an array, but just convert it to a string
internally using join (which I thought it would have done anyway)?

Although the user could do that manually, i.e.
filter([".one",".two"].join(','))

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [Bug] Interface ScrollTo

2006-11-28 Thread Daniel Gona

ps:

i use


if($.browser.mozilla){
if((window.pageXOffset<1)||(window.pageYOffset<1)){
window.scrollBy(0.1,0.1);
}
}   


to fix this, but i sure there is a more elegant way and also it might be
possible to merge this into ifxscrollto.js ?

Daniel
-- 
View this message in context: 
http://www.nabble.com/-Bug--Interface-ScrollTo-tf2719135.html#a7581897
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Sam Collett
On 28/11/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote:
> > > New to jQuery, and I'm trying to use it to set my external links to open
> > a
> > > new window without using any attributes to  mark the external links.  I
> > can
> > > do this with regular js, using a.href.match, but I can't get it to work
> > with
> > > jQuery.  Tried various directions, but no go.
> > >
> > > Sure I'll feel pretty stupid when this is answered, but here is my ugly,
> > > non-functioning code:
> > >
> > > $(function(){
> > > if ($!("a").href.match("http://www.internal.com";)) {
> > > $("a").click(
> > >  function() {
> > >  window.open(this.href); return false;
> > >  console.log("external");
> > >  };
> > > );
> > > };
> > > });
> >
> > This may work (untested), grabs all anchors that don't begin with http
> > (internal links should be referred to using '../../foo.html' or
> > '/bar.jpg'):
> >
> > $("a").not("[EMAIL PROTECTED]").click(
> > function(){
> > window.open(this.href);
> > console.log('external');
> > return false;
> > }
> > )
> >
> > $("a:[EMAIL PROTECTED]") may also work.
>
> When testing, keep in mind that browsers behaviour with href attributes is 
> quite inconsistent. While some return only the value as found in the markup, 
> others add the domain and protocol.
> --

So perhaps an additional check is needed, i.e. use location.hostname?

$("a").not("[EMAIL PROTECTED]").click(
function(){
if(this.href.indexOf(location.hostname) == -1) {
window.open(this.href);
console.log('external');
return false;
}
}
)

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] [Bug] Interface ScrollTo

2006-11-28 Thread Daniel Gona

hi

i stumbled uppon a bug with the interface plugin:

ScrollTo() does not work in fx (tested 1.0.8, 1.5.8, 2.0) if the user has
not scolled (pageXOffset or pageYOffset is 0).

it works fine in safari 2.04 and ie 6.


any idea how to fix this?

kind regards,
Daniel
-- 
View this message in context: 
http://www.nabble.com/-Bug--Interface-ScrollTo-tf2719135.html#a7581704
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Paul McLanahan
Actually, you have to check for href attribs that start with "http"
but then make sure that they're not "http://yourdomain.com"; because IE
will translate relative links into absolute ones in the returned
string from aTagRef.href. I'd also make sure that they don't start
with "javascript:" and "mailto:";.

On 11/28/06, Sam Collett <[EMAIL PROTECTED]> wrote:
> On 28/11/06, agent2026 <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > New to jQuery, and I'm trying to use it to set my external links to open a
> > new window without using any attributes to  mark the external links.  I can
> > do this with regular js, using a.href.match, but I can't get it to work with
> > jQuery.  Tried various directions, but no go.
> >
> > Sure I'll feel pretty stupid when this is answered, but here is my ugly,
> > non-functioning code:
> >
> > $(function(){
> > if ($!("a").href.match("http://www.internal.com";)) {
> > $("a").click(
> >  function() {
> >  window.open(this.href); return false;
> >  console.log("external");
> >  };
> > );
> > };
> > });
> >
> >
> >
> > Thanks for any help,
> > Adam
> > --
>
> This may work (untested), grabs all anchors that don't begin with http
> (internal links should be referred to using '../../foo.html' or
> '/bar.jpg'):
>
> $("a").not("[EMAIL PROTECTED]").click(
> function(){
> window.open(this.href);
> console.log('external');
> return false;
> }
> )
>
> $("a:[EMAIL PROTECTED]") may also work.
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Jörn Zaefferer
> > however the bug is only visible in a complex script, and within th
> Firebug
> > Inspector (but I can assure you it breaks my script), and I was not able
> to
> > write a simple test... so you might prefer to ignore me :)
> 
> So this is in the case an element of $("h1") does not match any selector.
> 
> The same error appears if you change the selector to:
> 
> $("h1").filter([".one", ".nomatch"]).css("background", "red");   
> 
> Now, it breaks when a selector does not match any element of $("h1").
> 
> In both cases the patch clears the issue

Could you please post this as a bug report?

I wonder if the filter(Array) method is really useful, why not just use 
this:
$("h1").filter(".one, .nomatch").css("background", "red");  
Should be pretty much the same.
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Sam Collett
> event.pageX = event.clientX + 
> document.body.scrollLeft;
> event.pageY = event.clientY + document.body.scrollTop;

document.body.scrollLeft is always 0 (unless there is no DTD), so this
is what it should be:

event.pageX = event.clientX + document.documentElement.scrollLeft;
event.pageY = event.clientY + document.documentElement.scrollTop;

However, this illustrates the the drag/drop code should work when
there is no doctype set (maybe low priority as most developers do use
one), i.e. IE is in Quirks Mode.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Jörn Zaefferer
> > Considering option 3 and the disadvantage of the cursor not being able
> to be
> > on top of the helper:
> >
> > Have you guys considered ways to go around this. Since #3 seems like the
> > fastest, you might want to look for little tricks.
> >
> > I quickly crunched together a small proof-of-concept showing that you
> can
> > get the effect of the cursor being on top of the helper while still
> > accessing the elements below through event.target. Yes, technically
> there is
> > no helper-element under the cursor, but a few surrounding it giving the
> same
> > effect. Although at first it might seem a little hackish, the code isn't
> > that much, and even my glue-and-gum proof-of-concept seems to work ok.
> At
> > least it should scale nicely since it doesn't really care about the
> amount
> > of droppables.
> >
> > It shouldn't be too hard to add some background color / image stuff to
> the
> > "helper" if more visuals are needed.
> >
> > Oh, and this is 100% only Firefox-tested and coded, to see if this is
> > feasible at all. Will propably explode with any other browser,
> currently.
> >
> > Check it out at: http://www.sparecom.fi/test/
> >
> > --
> > Suni
> 
> Doesn't work in IE7, as you use event.pageX/pageY
> 
> To get it to work in IE, replace these lines:
> 
>   $(document).mousemove(function(event){
>   
>   var target_elem = $(event.target);
> 
> With
> 
>   $(document).mousemove(function(event){
>   
>   if(!event.pageX)
>   {
>   event.pageX = event.clientX + document.body.scrollLeft;
>   event.pageY = event.clientY + document.body.scrollTop;
>   }
>   var target_elem = $(event.target || event.srcElement);
> 
> Hopefully when jQuery 1.1 is out it would mean you don't have to do
> this and you can stick with event.pageX/Y and event.target.

event.target is already normalized in the latest jQuery revision. It would b 
easy to add the normalization for pageX/Y, too, if that is useful. If so, could 
you add a bug ticket?
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Jörn Zaefferer
> > New to jQuery, and I'm trying to use it to set my external links to open
> a
> > new window without using any attributes to  mark the external links.  I
> can
> > do this with regular js, using a.href.match, but I can't get it to work
> with
> > jQuery.  Tried various directions, but no go.
> >
> > Sure I'll feel pretty stupid when this is answered, but here is my ugly,
> > non-functioning code:
> >
> > $(function(){
> > if ($!("a").href.match("http://www.internal.com";)) {
> > $("a").click(
> >  function() {
> >  window.open(this.href); return false;
> >  console.log("external");
> >  };
> > );
> > };
> > });
> 
> This may work (untested), grabs all anchors that don't begin with http
> (internal links should be referred to using '../../foo.html' or
> '/bar.jpg'):
> 
> $("a").not("[EMAIL PROTECTED]").click(
> function(){
> window.open(this.href);
> console.log('external');
> return false;
> }
> )
> 
> $("a:[EMAIL PROTECTED]") may also work.

When testing, keep in mind that browsers behaviour with href attributes is 
quite inconsistent. While some return only the value as found in the markup, 
others add the domain and protocol.
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Sam Collett
On 28/11/06, Juha Suni <[EMAIL PROTECTED]> wrote:
>
>
> Considering option 3 and the disadvantage of the cursor not being able to be
> on top of the helper:
>
> Have you guys considered ways to go around this. Since #3 seems like the
> fastest, you might want to look for little tricks.
>
> I quickly crunched together a small proof-of-concept showing that you can
> get the effect of the cursor being on top of the helper while still
> accessing the elements below through event.target. Yes, technically there is
> no helper-element under the cursor, but a few surrounding it giving the same
> effect. Although at first it might seem a little hackish, the code isn't
> that much, and even my glue-and-gum proof-of-concept seems to work ok. At
> least it should scale nicely since it doesn't really care about the amount
> of droppables.
>
> It shouldn't be too hard to add some background color / image stuff to the
> "helper" if more visuals are needed.
>
> Oh, and this is 100% only Firefox-tested and coded, to see if this is
> feasible at all. Will propably explode with any other browser, currently.
>
> Check it out at: http://www.sparecom.fi/test/
>
> --
> Suni

Doesn't work in IE7, as you use event.pageX/pageY

To get it to work in IE, replace these lines:

$(document).mousemove(function(event){

var target_elem = $(event.target);

With

$(document).mousemove(function(event){

if(!event.pageX)
{
event.pageX = event.clientX + document.body.scrollLeft;
event.pageY = event.clientY + document.body.scrollTop;
}
var target_elem = $(event.target || event.srcElement);

Hopefully when jQuery 1.1 is out it would mean you don't have to do
this and you can stick with event.pageX/Y and event.target.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil
> however the bug is only visible in a complex script, and within th Firebug
> Inspector (but I can assure you it breaks my script), and I was not able to
> write a simple test... so you might prefer to ignore me :)

OK, Bertrand (a.k.a. Toggg) has found a simple test case:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>

jQuery filter test
http://jquery.com/src/jquery-latest.js"; 
type="text/javascript">


$(function() {
$("h1").filter([".one", ".three"]).css("background", "red");
});




class one
class two
class three
gives 
Error: elem has no properties
Source File: http://jquery.com/src/jquery-latest.js
Line: 721




So this is in the case an element of $("h1") does not match any selector.

The same error appears if you change the selector to:

$("h1").filter([".one", ".nomatch"]).css("background", "red");   

Now, it breaks when a selector does not match any element of $("h1").

In both cases the patch clears the issue

-- Fil


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread MichaL Sanger
I think one of greatest features of jQuery is support of XPath and
CSS3 selectors, so why to mess up code with each() and match()?
Use this nice way:
$("[EMAIL PROTECTED]'http:']").click(function(){
...
});

More about it:
http://jquery.com/docs/Base/Expression/XPath/
http://jquery.com/docs/Base/Expression/CSS/

MichaL

2006/11/28, Michael Holloway <[EMAIL PROTECTED]>:
> Hi Adam,
>
> Welcome to the community.
> I haven't tried this, but how about:
>
> // each a-tag
> $('a').each(function(){
> // if the url contains http or https we take it it's an external url
> if(this.href.match(/https?/)){
>// when the link is clicked, open a popup and stop the parent
> going anywhere
> $(this).click(function(){
> window.open(this.href);
> return false;
> });
> }
> });
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Change href of external links

2006-11-28 Thread Sam Collett
On 28/11/06, agent2026 <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> New to jQuery, and I'm trying to use it to set my external links to open a
> new window without using any attributes to  mark the external links.  I can
> do this with regular js, using a.href.match, but I can't get it to work with
> jQuery.  Tried various directions, but no go.
>
> Sure I'll feel pretty stupid when this is answered, but here is my ugly,
> non-functioning code:
>
> $(function(){
> if ($!("a").href.match("http://www.internal.com";)) {
> $("a").click(
>  function() {
>  window.open(this.href); return false;
>  console.log("external");
>  };
> );
> };
> });
>
>
>
> Thanks for any help,
> Adam
> --

This may work (untested), grabs all anchors that don't begin with http
(internal links should be referred to using '../../foo.html' or
'/bar.jpg'):

$("a").not("[EMAIL PROTECTED]").click(
function(){
window.open(this.href);
console.log('external');
return false;
}
)

$("a:[EMAIL PROTECTED]") may also work.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-28 Thread Juha Suni
Considering option 3 and the disadvantage of the cursor not being able to be on 
top of the helper:

Have you guys considered ways to go around this. Since #3 seems like the 
fastest, you might want to look for little tricks.

I quickly crunched together a small proof-of-concept showing that you can get 
the effect of the cursor being on top of the helper while still accessing the 
elements below through event.target. Yes, technically there is no 
helper-element under the cursor, but a few surrounding it giving the same 
effect. Although at first it might seem a little hackish, the code isn't that 
much, and even my glue-and-gum proof-of-concept seems to work ok. At least it 
should scale nicely since it doesn't really care about the amount of droppables.

It shouldn't be too hard to add some background color / image stuff to the 
"helper" if more visuals are needed.

Oh, and this is 100% only Firefox-tested and coded, to see if this is feasible 
at all. Will propably explode with any other browser, currently.

Check it out at: http://www.sparecom.fi/test/

-- 
Suni___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil

Hello,

I've encountered a bug in .filter(array)

however the bug is only visible in a complex script, and within th Firebug
Inspector (but I can assure you it breaks my script), and I was not able to
write a simple test... so you might prefer to ignore me :)

I can provide the complex test if absolutely needed, but it will need more work
than just testing this patch against the test suite, I guess.


In any case, here is the patch:

filter: function(t) {
return this.pushStack(
t.constructor == Array &&
-   jQuery.map(this,function(a){
+   jQuery.grep(this,function(a){
for ( var i = 0; i < t.length; i++ )
if ( jQuery.filter(t[i],[a]).r.length )
-   return a;
+   return true;
return false;
}) ||




The idea of a .filter() is to remove nodes that don't match, not to insert
'false' instead. In my tests, when I use Firebug I clearly see that the
object I receive is something like the (crazy) following:

length: 1
0: node0
1: false
2: node2


-- Fil


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Change href of external links

2006-11-28 Thread Michael Holloway
Hi Adam,

Welcome to the community.
I haven't tried this, but how about:

// each a-tag
$('a').each(function(){
// if the url contains http or https we take it it's an external url
if(this.href.match(/https?/)){
   // when the link is clicked, open a popup and stop the parent 
going anywhere
$(this).click(function(){
window.open(this.href);
return false;
});
}
});


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] iFxTransfer problem with IE

2006-11-28 Thread nerique

Hi,
I meet a problem with the ifxtransfer plugin. It doesn't work with IE7.
COuld you help ?

el.TransferTo(
{
to: 'd_' + el.attr('id'),
duration: 500,
complete: function(to)
{
   
$(to).click(deleteFromSelectedCategories).Pulsate(100,2);
}
}
).Puff(400);

This returns me an error in Jquery on es=e.style.

Thanks for your time.

Nerique

-- 
View this message in context: 
http://www.nabble.com/iFxTransfer-problem-with-IE-tf2718478.html#a7579660
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


  1   2   >