[jQuery] proposal for help fighting comment spams on Trac

2006-09-21 Thread Gilles Vincent
Comment spams are the worst to manage in Trac. I've written two small shell scripts which enable to detect comment spams and clear them easily.Here are these scripts ::~$ cat ./check_comments.sh #!/bin/bash
echo select * from ticket_change where time in (select time from ticket_change where newvalue like '%http:%'); | ./sqlite3 trac/$1/db/trac.db:~$ cat ./erase_bad_comments.sh #!/bin/bash# auteur: Gilles Vincent : 
[EMAIL PROTECTED]# simple comment spam cleaner v.1.0# works on http://trac.rezo.net/trac/spip# It's based on keywords that can be found in spams
# The keywords can be detected with the complementary script :check_comments nbargs=$#if [ $nbargs -lt 2 ]thenecho simple comment spam cleaner v.1.0echo  It's based on keywords that can be found in spams
echo (take care to choose you keywords cautiously)echo parameters : $0 tracName [motCle1] [motcle2] [motcle3] ...echo 'tracName' ismandatory : use 'spip' or 'spip-zone'  or 'test' ...
elsefor x in $*doif [ $x != $1 ]thenecho delete from ticket_change where time in (select time from ticket_change where newvalue like '%$x%'); | ./sqlite3 trac/$1/db/trac.db
fidonefi--This script must be adapted to your configuration :For spip, every projects are stored under a unique root : trac/The first parameter indicates the directory name of this project
It's certainly possible to clear spams automatically with some keywords (Vi*gr* etc..)Personnaly, a daily report is sent to me with crontab, and in our case  ( we are not as famous as jquery ;)  it's enought.
-Hope it helps !.GillesPS.: I've implemented also a simple solution to fight ticket spams. Does it interess you ?PPS.: have you upgraded to Trac1.0 ? There is an antispam plugin which looks quite good : 
http://trac.edgewall.org/wiki/SpamFilter
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Google map plugin idea

2006-09-21 Thread Fil
@ Dylan Verheul [EMAIL PROTECTED] :
 Something like this:
 http://www.dyve.net/jquery?googlemaps

This is great Dylan; could be coupled with the geo microformat to give a
generic tool. See http://www.jquery.info/spip.php?article7

-- Fil


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


Re: [jQuery] Google map plugin idea

2006-09-21 Thread Klaus Hartl


Fil schrieb:
 @ Dylan Verheul [EMAIL PROTECTED] :
 Something like this:
 http://www.dyve.net/jquery?googlemaps
 
 This is great Dylan; could be coupled with the geo microformat to give a
 generic tool. See http://www.jquery.info/spip.php?article7


wow, great plugin and great idea with the microformats...

just a little thing: I'd check additionally for existence of 
GBrowserIsCompatible just in case the google maps script is not loaded 
for whatever reason:

if (GBrowserIsCompatible  !GBrowserIsCompatible()) ...


Cheers, Klaus

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


Re: [jQuery] Google map plugin idea

2006-09-21 Thread Dylan Verheul
Klaus,

I changed the check to

// If we aren't supported, we're done
if (!GBrowserIsCompatible || !GBrowserIsCompatible()) return this;

Thanks for your input.

Dylan

On 9/21/06, Klaus Hartl [EMAIL PROTECTED] wrote:


 Fil schrieb:
  @ Dylan Verheul [EMAIL PROTECTED] :
  Something like this:
  http://www.dyve.net/jquery?googlemaps
 
  This is great Dylan; could be coupled with the geo microformat to give a
  generic tool. See http://www.jquery.info/spip.php?article7


 wow, great plugin and great idea with the microformats...

 just a little thing: I'd check additionally for existence of
 GBrowserIsCompatible just in case the google maps script is not loaded
 for whatever reason:

 if (GBrowserIsCompatible  !GBrowserIsCompatible()) ...


 Cheers, Klaus

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


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


Re: [jQuery] Bug in .color() / Firefox

2006-09-21 Thread Justin Carter
On 9/21/06, Sam Collett [EMAIL PROTECTED] wrote:
 Expanding on that, this is a basic function to convert to hex. No
 fancy regexp's or string parsing needed:

 function RGBToHex(value)
 {
 var re = /\d+/g;
 var matches = value.match(re);
 var r = parseInt(matches[0]);
 var g = parseInt(matches[1]);
 var b = parseInt(matches[2]);
 return # + r.toString(16) + g.toString(16) + b.toString(16);
 }

 It will work with rgb(255,255,255), rgb ( 255,  255,  255 ) etc

That probably takes care of most of it :) Just a check to see whether
the original string starts with a # and it'd be pretty close to a
working solution.

I wonder if anyone can confirm what values Safari and other browsers
return as the computed style value for color? Hopefully our bases
would be covered with just the hex value prefixed with # and the RGB
notation. Does RGBA ever come into it, or does the alpha value get
pushed into the opacity property or something?

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


Re: [jQuery] Bug in .color() / Firefox

2006-09-21 Thread Christof Donat
Hi,

 function RGBToHex(value)
 {
   var re = /\d+/g;
   var matches = value.match(re);
   var r = parseInt(matches[0]);
   var g = parseInt(matches[1]);
   var b = parseInt(matches[2]);
   return # + r.toString(16) + g.toString(16) + b.toString(16);
 }

function RGBToHex(value) {
var re = /\d+/g;
var matches = value.match(re);
for( var i = 0; i  matches.length; i++ ) {
matches[i] = parseInt(matches[i]).toString(16);
if( matches[i].length  2 ) matches[i] = '0'+matches[i];
}
return # + matches[0] + matches[1] + matches[2];
}

Otherwise you will get #ff00 from rgb(255,0,0)

Christof

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


Re: [jQuery] Bug in .color() / Firefox

2006-09-21 Thread Sam Collett
On 21/09/06, Justin Carter [EMAIL PROTECTED] wrote:
 On 9/21/06, Sam Collett [EMAIL PROTECTED] wrote:
  Expanding on that, this is a basic function to convert to hex. No
  fancy regexp's or string parsing needed:
 
  function RGBToHex(value)
  {
  var re = /\d+/g;
  var matches = value.match(re);
  var r = parseInt(matches[0]);
  var g = parseInt(matches[1]);
  var b = parseInt(matches[2]);
  return # + r.toString(16) + g.toString(16) + b.toString(16);
  }
 
  It will work with rgb(255,255,255), rgb ( 255,  255,  255 ) etc

 That probably takes care of most of it :) Just a check to see whether
 the original string starts with a # and it'd be pretty close to a
 working solution.

You would probably check that before calling the function, or after
'var matches' add the following:
if(matches.length != 3) return value;

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


Re: [jQuery] Bug in .color() / Firefox

2006-09-21 Thread Sam Collett
On 21/09/06, Christof Donat [EMAIL PROTECTED] wrote:
 Hi,

  function RGBToHex(value)
  {
var re = /\d+/g;
var matches = value.match(re);
var r = parseInt(matches[0]);
var g = parseInt(matches[1]);
var b = parseInt(matches[2]);
return # + r.toString(16) + g.toString(16) + b.toString(16);
  }

 function RGBToHex(value) {
 var re = /\d+/g;
 var matches = value.match(re);
 for( var i = 0; i  matches.length; i++ ) {
 matches[i] = parseInt(matches[i]).toString(16);
 if( matches[i].length  2 ) matches[i] = '0'+matches[i];
 }
 return # + matches[0] + matches[1] + matches[2];
 }

 Otherwise you will get #ff00 from rgb(255,0,0)

 Christof

That's certainly a better way (forgot to take that situation into account).

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


Re: [jQuery] Reminder: Magazine Release Imminent

2006-09-21 Thread digital spaghetti
Talking about magazines, I got my copy of .net magazine in the post
the other day, very nice article that was in it!

Tane
http://www.digitalspaghetti.me.uk

On 9/20/06, Yehuda Katz [EMAIL PROTECTED] wrote:
 It's going to be released as a PDF, but maybe I will create an RSS feed with
 a link to remind you of new issues.

 -- Yehuda


 On 9/20/06, Tim Gossett [EMAIL PROTECTED] wrote:
   Just a reminder that issue 1 of the Visual jQuery Magazine is set to be
 released tonight. Keep an eye out!
 
  Will there be an RSS feed or some way of subscribing to Visual jQuery
  Magazine? I'd love to keep up with the monthly editions, and having it
  pushed to me would be very convenient, compared to me having to pull
  it down.
 
  Tim
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 



 --
 Yehuda Katz
 Web Developer | Wycats Designs
 (ph)  718.877.1325
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




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


Re: [jQuery] AJAX Comments?

2006-09-21 Thread Klaus Hartl


digital spaghetti schrieb:
 Just a quick question, has anyone on the list done any work on a AJAX
 comments plugin for jQuery?
 
 If not, then I'm probably going to start working on one to work with
 my Wordpress theme (which I have started converting all the JS from
 Prototype to JQuery), but rather than go ahead and re-invent the wheel
 if someone has already started, I thought I'd ask.
 
 Thanks,
 Tane
 http://www.digitalspaghetti.me.uk

I want to do that for a long time, never have (took) the time for that. 
Maybe I can assist a little if needed :-)

-- Klaus

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


Re: [jQuery] datePicker is gone when 2nd time loading a form

2006-09-21 Thread Michael Grosser
you put it into the place where you build your form, and give it id=opsa?=$_SESSION['count']?(if your using php)or maybe use _javascript_, and useid = $(sdds).attr('id');$(sdds).attr('id',id+count);
but a REAL solution would be much nicer :)2006/9/20, Chris Mcleod [EMAIL PROTECTED]:














Where do you put this?



I'm having the same problem as you
were, with some forms loaded by Thickbox. The first form loads fine, but
subsequent forms are missing the Date Picker "widgets".



Chris











From:
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On Behalf Of Michael Grosser
Sent: 19 September 2006 17:03
To: discuss
Subject: [jQuery] datePicker is
gone when 2nd time loading a form





and now for the solution :/

$_SESSION['count'] ++;

and every form input gets a raising id, so that its unique everytime -
datepicker works :





__

This email has been scanned by Senergy Ltd for viruses.

Powered by MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/-- mfg M.Grosser
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] $([EMAIL PROTECTED]'FieldName']) does not work in Firefox

2006-09-21 Thread Sam Collett
When attempting to get an element with the name (the same happens when
I use 'id') ends with 'FieldName' I get an error 'z has no
properties'. I am doing this as the page is an ASP.NET one (so the
name is generated server side, but always contains 'FieldName').

Seems to work fine in IE though.

I am doing this to give 'FieldName' focus when the page loads.
$([EMAIL PROTECTED]'FieldName'])[0].focus();

Using * (contains) instead of $ causes the same error.

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


Re: [jQuery] $([EMAIL PROTECTED]'FieldName']) does not work in Firefox

2006-09-21 Thread Brian
Might be related to bug #194, which Joern squished last week.  Try the
latest build?

- Brian


 When attempting to get an element with the name (the same happens when
 I use 'id') ends with 'FieldName' I get an error 'z has no
 properties'. I am doing this as the page is an ASP.NET one (so the
 name is generated server side, but always contains 'FieldName').

 Seems to work fine in IE though.

 I am doing this to give 'FieldName' focus when the page loads.
 $([EMAIL PROTECTED]'FieldName'])[0].focus();

 Using * (contains) instead of $ causes the same error.

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


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


[jQuery] JTip Issue with IE

2006-09-21 Thread Rey Bango
Hi guys,

I'm having an issue using JTip with IE 6. My select boxes are 
overlapping the popup DIV that JTip creates. You can see the issue here:

http://www.intoajax.com/jtiptest.htm

I've tried adding an IFRAME of the same dimensions as the JT DIV on the 
fly before the JT DIV is created, like this:

$(body).append('iframe src=javascript:false; name=jTipiFrame 
id=jTipiFrame scrolling=no frameborder=0 style=display: block; 
left: 319px; position: absolute; top: 147px; width: 250px; height: 60px; 
z-index:99;/iframe');

jwidth = $( #JT ).width();
jheight = $( #JT ).height();

$('#jTipiFrame').css({left: clickElementx+px, top: clickElementy+px, 
width: jwidth+px, height: jheight+px, display: block});   

$( #jTipiFrame ).show();  

but still no dice.

This is an issue acknowledged by MS here:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q177/3/78.aspNoWebContent=1

where SELECT elements are considered Windowed elements and thus take 
display priority over Windowless elements such as DIVs irregardless of 
the z-index. The only exception to this are IFRAMES and thats why I was 
trying to drop one in behind the DIV. Its called shimming. I just 
can't get it to work.

Any help would be appreciated.

Rey


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


[jQuery] JHeartbeat - New Plugin

2006-09-21 Thread Jason Levine

Hi,

I decided to try my hand at my first real plugin for JQuery.  (Slightly
Thickerbox is more of a script that works with JQuery than an actual
plugin.)  This is in beta form now and is likely to be of limited use, but
here it is:

JHeartbeat
http:/www.jasons-toolbox.com/JHeartbeat/

It will automatically reload a URL that you provide it every X number of
seconds (X being defined by you).  You can even have it run a particular
function once the load has been completed.  I use it to keep sessions alive
even during long periods of inactivity.  But since the plugin puts the
contents of the page into a div with the ID of HeartBeatDIV and since you
can define a callback function, you can have it automatically update a
section of your page.

This is beta right now so please download it and let me know what you think
about it.  (The lessons that I learn with JHeartbeat may be applied to a
plugin version of Slightly Thickerbox.)

-Jason Levine


-- 
View this message in context: 
http://www.nabble.com/JHeartbeat---New-Plugin-tf2278733.html#a6329221
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Google map plugin idea

2006-09-21 Thread Rafael Santos
Hey Dylan... that's great... So nice what you've done...Im afraid i cant use it here in Brazil, ppl are being kidnaped by guys who get users' infos @ orkut profiles. If i create a portuguese Social Networking i'd be helping these guys... lol
I'l have to way some months =(2006/9/21, Dylan Verheul [EMAIL PROTECTED]:
Klaus,I changed the check to// If we aren't supported, we're doneif (!GBrowserIsCompatible || !GBrowserIsCompatible()) return this;Thanks for your input.DylanOn 9/21/06, Klaus Hartl 
[EMAIL PROTECTED] wrote: Fil schrieb:  @ Dylan Verheul [EMAIL PROTECTED] :
  Something like this:  http://www.dyve.net/jquery?googlemaps   This is great Dylan; could be coupled with the geo microformat to give a
  generic tool. See http://www.jquery.info/spip.php?article7 wow, great plugin and great idea with the microformats...
 just a little thing: I'd check additionally for existence of GBrowserIsCompatible just in case the google maps script is not loaded for whatever reason: if (GBrowserIsCompatible  !GBrowserIsCompatible()) ...
 Cheers, Klaus ___ jQuery mailing list discuss@jquery.com 
http://jquery.com/discuss/___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/

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


Re: [jQuery] JHeartbeat - New Plugin

2006-09-21 Thread Dan Atkinson

Thanks for the link.

I'll be sure to try it out when I get a spare second.


Jason Levine wrote:
 
 Hi,
 
 Sorry about that.  Here's the link: 
 http://www.jasons-toolbox.com/JHeartbeat/
 
 Also sorry about any double-post.  I was having trouble signing up and
 Nabble was reporting that my message didn't get through, so I tried
 posting it again.
 
 

-- 
View this message in context: 
http://www.nabble.com/JHeartbeat---New-Plugin-tf2278733.html#a6430529
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] JHeartbeat - New Plugin

2006-09-21 Thread Sam Collett
On 21/09/06, Jason Levine [EMAIL PROTECTED] wrote:

 Hi,

 Sorry about that.  Here's the link:
 http://www.jasons-toolbox.com/JHeartbeat/

 Also sorry about any double-post.  I was having trouble signing up and
 Nabble was reporting that my message didn't get through, so I tried posting
 it again.

 --

Just a suggestion. How about being able to do it in a more jQuery-like
way. Instead of adding a div called 'HeartBeatDIV' to the page, you
could apply it to an existing div, i.e.:

$(#mydiv).jheartbeat({url: mypage.asp, delay: 3000}, myCallBackFunction)

You could then use it several times on a page as well (as in several
div's that reload content from different locations periodically). Kind
of like doing the following, but with potential for much more (due to
being a plugin)

setTimeout($('#mydiv).load('mypage.asp'), 3000)

Another suggestion would be the ability to pass on parameters:
$(#mydiv).jheartbeat({url: mypage.asp, delay: 3000, urlparams :
{searchfor: bar} }, myCallBackFunction)

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


Re: [jQuery] Interface: draggables, droppables, and sortables

2006-09-21 Thread bbuchs

Stefan, I hate to harp on this, but the more I work with your new draggables
automatically become sortables function, the less i like it. While the demo
you created certainly works, I have a couple of issues with it.

First, from a usability perspective, I would want to turn ghosting on for
the items in the pallette; doing that currently breaks the demo. Right
now, if a user drags an item in the pallette, it appears as if it's being
removed, not cloned. I'm sure this will be fixed eventually.

Secondly, your code change more or less makes droppables obsolete, and
unless your objective is to do exactly what Brendan had set out to do, it's
unintuitive logic. If I have something I want to drag, I would also have
something to drop it on. Converting it into a sortable object is not the
most likely use case scenario. Instead, wouldn't the SortableAddItem
function be the more logical solution?

I don't want to give the impression that I'm not grateful for your
contributions - I AM! I just think that you reacted so quickly to one
person's feature request and may not have considered what it meant in the
bigger picture for everyone else.





bbuchs wrote:
 
 Brendan, Thanks for doing a good job explaining what I was trying to - 
 the jQuery.iSort.helper.get bug. I would hope that this can be fixed. 
 I can see a situation where I might want to have a list on a page that 
 isn't a sortable until a user initiates that action (click here to sort 
 this list). If I have any other draggables on the page, I would get the 
 error described below. Your tip about the accepts paramater also works 
 great.
 
 I still strongly disagree that draggables should automatically become 
 part of a sortable if it's dropped in one, but at least I can work 
 around it.
 
 The only remaining issue I have is that the draggablesortable feature 
 breaks the ghosting functionality for the draggable. In my demo, the 
 right-side draggables are essentially a palette of items. The user 
 should be dragging out a copy of each item, not the item itself. 
 Again, that can be accounted for if the ghosting bug is fixed.
 
 Thanks guys!
 
   - Bryan
 
 
 
 
 
 Brendan O'Brien wrote:
 Hi,
 
 I'm responding to a few things in this post.
 
 First, I took a look at Bryan's example pages.  The problem you see on 
 the second page (where isortables.js has been included, but no Sortables 
 have been declared) that throws the error |jQuery.iSort.helper.get is 
 not a function|; I've had this problem too even before the Sep. 11 
 patch.  The problem is that when isortables has been included, then 
 draggables attempts to execute the line:
 
 jQuery.iSort.helper.get(0).style.display = 'none'
 
 when dragging over a droppable to hide the sortable helper.  But since 
 you never called Sortables this variable is just the boolean value 
 false.  It only gets initialized when something is made Sortable.  
 That's why on your third page, where you make something Sortable, that 
 problem doesn't occur anymore.  I think this is probably just a bug.  
 Either draggables shouldn't attempt to hide the helper field if it 
 hasn't been initialized (this is easy to do since the value is false by 
 default.  I did this on my local build and it seems to work), or 
 including isortables.js should initialize the field even if nothing has 
 been declared as Sortable.
 
 Second, thanks Stefan for adding the functionality that allows Sortables 
 to accept draggables even if they didn't originate from a sortable 
 container.  This solves the problem I was having.  And I really like how 
 I can now drag items from outside the sortable container, and it shows 
 where the item will be dropped.  It's great.  I do agree with Bryan 
 though that not everyone will want this, so maybe there could be a 
 switch to turn it off?  I'm not sure how hard that would be.  Anyway, I 
 tried disabling it by just changing the class name of the draggables to 
 something that Sortables doesn't accept, and that works just fine.  
 Hopefully that helps for now.
 
 The only problem I have now when working with your demo page (sorry for 
 being nit picky, it's just that my users are picky so I have to be!), is 
 that when I pick up a draggable, it is removed from the other draggables 
 (this also happens on Bryan's third test page).  This is fine, it's the 
 default behavior.  When I add ghosting : true to the draggable config, 
 it still gets removed.  But when I hover over the sortable container it 
 does show a copy of the draggable, instead of the normal empty helper.  
 This is the behavior I would normally expect from adding ghosting : true 
 to the sortable config.  But actually, adding ghosting : true to the 
 sortable config doesn't have any effect.
 
 Other than that, the new functionality is great!  Bryan, I hope the 
 workaround I mentioned for the new stuff helps (I still agree though 
 that a switch to turn it on and off would be nice).
 
 Regards,
 Brendan
 
 On 9/16/06, *Stefan Petre*  

Re: [jQuery] Interface: draggables, droppables, and sortables

2006-09-21 Thread bbuchs

Sorry, but I just had another tought... 

The demos I initially provided were simplified - my end goal is not to just
move an DOM element from one side of the page to another. What I was trying
to accomplish was that the dropping would initiate a function that creates a
brand new DOM element that is quite different from the one that had been
dragged. I suppose I should have made that clearer from the start. 

 - bryan




bbuchs wrote:
 
 Stefan, I hate to harp on this, but the more I work with your new
 draggables automatically become sortables function, the less i like it.
 While the demo you created certainly works, I have a couple of issues with
 it.
 
 First, from a usability perspective, I would want to turn ghosting on for
 the items in the pallette; doing that currently breaks the demo. Right
 now, if a user drags an item in the pallette, it appears as if it's being
 removed, not cloned. I'm sure this will be fixed eventually.
 
 Secondly, your code change more or less makes droppables obsolete, and
 unless your objective is to do exactly what Brendan had set out to do,
 it's unintuitive logic. If I have something I want to drag, I would also
 have something to drop it on. Converting it into a sortable object is not
 the most likely use case scenario. Instead, wouldn't the SortableAddItem
 function be the more logical solution?
 
 I don't want to give the impression that I'm not grateful for your
 contributions - I AM! I just think that you reacted so quickly to one
 person's feature request and may not have considered what it meant in the
 bigger picture for everyone else.
 
 
 
 
 
 bbuchs wrote:
 
 Brendan, Thanks for doing a good job explaining what I was trying to - 
 the jQuery.iSort.helper.get bug. I would hope that this can be fixed. 
 I can see a situation where I might want to have a list on a page that 
 isn't a sortable until a user initiates that action (click here to sort 
 this list). If I have any other draggables on the page, I would get the 
 error described below. Your tip about the accepts paramater also works 
 great.
 
 I still strongly disagree that draggables should automatically become 
 part of a sortable if it's dropped in one, but at least I can work 
 around it.
 
 The only remaining issue I have is that the draggablesortable feature 
 breaks the ghosting functionality for the draggable. In my demo, the 
 right-side draggables are essentially a palette of items. The user 
 should be dragging out a copy of each item, not the item itself. 
 Again, that can be accounted for if the ghosting bug is fixed.
 
 Thanks guys!
 
   - Bryan
 
 
 
 
 
 Brendan O'Brien wrote:
 Hi,
 
 I'm responding to a few things in this post.
 
 First, I took a look at Bryan's example pages.  The problem you see on 
 the second page (where isortables.js has been included, but no Sortables 
 have been declared) that throws the error |jQuery.iSort.helper.get is 
 not a function|; I've had this problem too even before the Sep. 11 
 patch.  The problem is that when isortables has been included, then 
 draggables attempts to execute the line:
 
 jQuery.iSort.helper.get(0).style.display = 'none'
 
 when dragging over a droppable to hide the sortable helper.  But since 
 you never called Sortables this variable is just the boolean value 
 false.  It only gets initialized when something is made Sortable.  
 That's why on your third page, where you make something Sortable, that 
 problem doesn't occur anymore.  I think this is probably just a bug.  
 Either draggables shouldn't attempt to hide the helper field if it 
 hasn't been initialized (this is easy to do since the value is false by 
 default.  I did this on my local build and it seems to work), or 
 including isortables.js should initialize the field even if nothing has 
 been declared as Sortable.
 
 Second, thanks Stefan for adding the functionality that allows Sortables 
 to accept draggables even if they didn't originate from a sortable 
 container.  This solves the problem I was having.  And I really like how 
 I can now drag items from outside the sortable container, and it shows 
 where the item will be dropped.  It's great.  I do agree with Bryan 
 though that not everyone will want this, so maybe there could be a 
 switch to turn it off?  I'm not sure how hard that would be.  Anyway, I 
 tried disabling it by just changing the class name of the draggables to 
 something that Sortables doesn't accept, and that works just fine.  
 Hopefully that helps for now.
 
 The only problem I have now when working with your demo page (sorry for 
 being nit picky, it's just that my users are picky so I have to be!), is 
 that when I pick up a draggable, it is removed from the other draggables 
 (this also happens on Bryan's third test page).  This is fine, it's the 
 default behavior.  When I add ghosting : true to the draggable config, 
 it still gets removed.  But when I hover over the sortable container it 
 does show a copy of the draggable, instead 

[jQuery] toggleClass and removeClass

2006-09-21 Thread Mark D. Lincoln








I have found a couple of fixes for the problem of using
toggleClass and removeClass in Internet Explorer (IE). It seems the root
of the problem is that when you have multiple classes assigned to the className
property of an element in IE (class1 class2) and you remove one
of the classes from the className property, you can be left with a className
property containing classes with leading spaces ( class2).
What is even worse, if you remove both classes multiple times, you can end up
with the className property containing just blank spaces
( ). It is these leading spaces which are
causing toggleClass and removeClass to fail with multiple classes assigned to
the className property. This problem does not seem to exist in Firefox
since it seems to remove leading and trailing spaces when the className
property is changed.



After doing some research, I have come up with two possible
solutions. The first solution involves modifying the regular _expression_
used to remove the class from the className property. On line 345 of the
jQuery source code, you will find the following:



new RegExp((^|\\s*\\b[^-])+c+($|\\b(?=[^-])), g),
) ); 



Change the regular _expression_ to the following:



new RegExp((^\\s*\\b[^-]|)+c+($\\b(?=[^-])|), g), ) ); 



Note the position of the pipe (|) characters. This solution
will enable the removal of the specified class from the className property in
IE, however, it does not solve the problem of the extra spaces. Although
the class being toggled or removed can now be found within the className
property, the className property will continue to grow with extraneous blank
spaces each time a class is removed. The blank spaces do not seem to
cause any short term problem, however, they might if the user uses the Web application
for more than a short period.



The other solution is more of a sledgehammer approach as it
involves removing the extraneous blank spaces from the className property
anytime a class is removed. This solution involves trimming the spaces
from the className during the class removal. On lines 343 to 345 of the
jQuery source code you will see the following implementation of the
remove method of the className property:



o.className = !c ?  :

 o.className.replace(

 new
RegExp((^|\\s*\\b[^-])+c+($|\\b(?=[^-])),
g), );



If you change this code to use the trim method
of the jQuery class, you will have the following:



o.className = jQuery.trim( !c ?  :

 o.className.replace(

 new
RegExp((^|\\s*\\b[^-])+c+($|\\b(?=[^-])), g),
) );



This solution does not require changing the regular
_expression_ since the extraneous spaces will no longer appear within the
className property. This is the solution I am currently using, however,
if someone has a better solution, please let me know.





Mark
D. Lincoln



Mark D. Lincoln, Director of Research  Development

Eye On Solutions, LLC

(866) 253-9366x101

www.eyeonsolutions.com








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


Re: [jQuery] toggleClass and removeClass

2006-09-21 Thread George Adamson

Hello Mark,

Nice to see this bug progressing. A search on keywords 
http://www.nabble.com/forum/Search.jtp?forum=15494local=yquery=classname+space
classname space  in the Nabble jquery forum reveals that quite a few of us
have reported this in one form or another.

Cheers,

George


Mark D. Lincoln wrote:
 
 I have found a couple of fixes for the problem of using toggleClass and
 removeClass in Internet Explorer (IE).  It seems the root of the problem
 is
 that when you have multiple classes assigned to the className property of
 an
 element in IE (class1 class2) and you remove one of the classes from the
 className property, you can be left with a className property containing
 classes with leading spaces ( class2).  What is even worse, if you
 remove
 both classes multiple times, you can end up with the className property
 containing just blank spaces ().  It is these leading spaces which
 are
 causing toggleClass and removeClass to fail with multiple classes assigned
 to the className property.  This problem does not seem to exist in Firefox
 since it seems to remove leading and trailing spaces when the className
 property is changed.
 
  
 
 After doing some research, I have come up with two possible solutions. 
 The
 first solution involves modifying the regular expression used to remove
 the
 class from the className property.  On line 345 of the jQuery source code,
 you will find the following:
 
  
 
 new RegExp((^|\\s*\\b[^-])+c+($|\\b(?=[^-])), g), ) ); 
 
  
 
 Change the regular expression to the following:
 
  
 
 new RegExp((^\\s*\\b[^-]|)+c+($\\b(?=[^-])|), g), ) ); 
 
  
 
 Note the position of the pipe (|) characters.  This solution will enable
 the
 removal of the specified class from the className property in IE, however,
 it does not solve the problem of the extra spaces.  Although the class
 being
 toggled or removed can now be found within the className property, the
 className property will continue to grow with extraneous blank spaces each
 time a class is removed.  The blank spaces do not seem to cause any short
 term problem, however, they might if the user uses the Web application for
 more than a short period.
 
  
 
 The other solution is more of a sledgehammer approach as it involves
 removing the extraneous blank spaces from the className property anytime a
 class is removed.  This solution involves trimming the spaces from the
 className during the class removal.  On lines 343 to 345 of the jQuery
 source code you will see the following implementation of the remove
 method
 of the className property:
 
  
 
 o.className = !c ?  :
 
o.className.replace(
 
   new RegExp((^|\\s*\\b[^-])+c+($|\\b(?=[^-])), g), );
 
  
 
 If you change this code to use the trim method of the jQuery class, you
 will have the following:
 
  
 
 o.className = jQuery.trim( !c ?  :
 
o.className.replace(
 
   new RegExp((^|\\s*\\b[^-])+c+($|\\b(?=[^-])), g), ) );
 
  
 
 This solution does not require changing the regular expression since the
 extraneous spaces will no longer appear within the className property. 
 This
 is the solution I am currently using, however, if someone has a better
 solution, please let me know.
 
  
 
  
 
 Mark D. Lincoln
 
  
 
 Mark D. Lincoln, Director of Research  Development
 
 Eye On Solutions, LLC
 
 (866) 253-9366x101
 
 www.eyeonsolutions.com
 
  
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/toggleClass-and-removeClass-tf2313152.html#a6432990
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] JTip Issue with IE

2006-09-21 Thread Karl Swedberg
On Sep 21, 2006, at 11:45 AM, Rey Bango wrote:

 Solved!! Thanks to Yehuda Katz for pointing me over to the jQuery date
 picker plugin which had a IE hack that resolved the issue!

 I took some code from the date picker plugin and update JTip.  
 Here's the
 code for anyone interested:

 global.css (added):

 #JT iframe
 {
   display:none;/*sorry for IE5*/
   display/**/:block;/*sorry for IE5*/
   position:absolute;
   top:0;
   left:0;
   z-index:-1;
   filter:mask();
   width:3000px;
   height:3000px;
 }

 jtip.js (added immediately after the JT div is created):

 if ($.browser.msie) {
   
 / we put a styled iframe behind the calendar so HTML SELECT elements
 don't show through
   
 $('#JT').append(document.createElement('iframe'));
   
 } 

That's great, Rey! Glad you got it worked out. I'm curious, though,  
if that works without doing this, too:

   #JT {
 overflow: hidden;
   }

I tried to solve your case, too, and did it very similarly, with just  
a couple differences:
- Added everything you did in global.css EXCEPT for the height and  
width.

- Put this right after div is created in jtip.js:

   if ($.browser.msie) {
$('#JT').prepend('iframe id=jTipiFrame/iframe');
var iwidth = (params['width']*1+79) + px;
$('#jTipiFrame').width(iwidth).height('450px'); 
   }

So, I made the width the same as that of the jTip, and I made the  
height ... um ... 450px. That's my one sticking point. If I set #JT  
to overflow:hidden, I can give #jTipiFrame a ridiculous height; if  
I don't, I get scrollbars on hover. I tried to give it the same  
height as that of #JT, but apparently the #JT height is computed  
before it's loaded. The overflow: hidden, on the other hand, cuts  
off some of your text.

Oh well, it was worth a try anyway. If you're interested in seeing my  
version of your test page, go to
http://test.learningjquery.com/jtiptest.htm
(Note: I didn't upload the little arrow images, so it won't look  
perfect)

Cheers,

Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com



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


Re: [jQuery] How to change value of select dropdown?

2006-09-21 Thread dizzledorf

Kawikak,

Naturally I figured it out 15 minutes after posting :)

Option values was the key.  I was using old copied code that didn't even
specify values, e.g.
optionAKoptionALoptionAR etc...

once I changed that to:
OPTION value=AKAK/OPTIONOPTION value=ALAL/OPTIONOPTION
value=ARAR/OPTION

everything is now both hunky and dory.  And Matt's way (which I had also
tried before) works as well.

Final code:
$(#zip).keyup(function(){
if ($(#zip).val().length == 5) {
$(#state).attr(value,ME);
}
});


On to $.post to really process the ZIP code!


Thanks,
--DIZZLE




kawikak wrote:
 
 I use this function to set the option of a drop down input. Works in IE6
 and FF that I know of. You'll notice it only works well for options with
 unique values. You could probably easily change it if you needed
 otherwise.
 
 // Usage
 $([EMAIL PROTECTED]'State']).option( CA );
 
 // Plugin
 jQuery.fn.option = function (value) {
   return this.each(function() {
   var select = $(this)[0];
   for ( var i=0; iselect.length; i++ )
   if (select[i].value == value)
   select.selectedIndex = i;
   });
 };
 
 
 Kawika
 
 
 
 dizzledorf wrote:
 
 Seems like a simple action, and it works in Firefox, but not IE...
 
 I'm trying to change the value of a dropdown box based on an event
 triggered in another text box.  It's a contact form, and I just want to
 change the state dropdown Select on the keyup of the 5th character of the
 zip input box.
 
 re:
 $(#zip).keyup(function(){
  if ($(#zip).val().length == 5) {
  // IE can get in here, but doesn't execute the following line
  $(#state).attr(value,FL);  // just testing for now
  }
 });
 
 As I mentioned, this works in Firefox 1.5.0.7, but not in IE6...
 
 How do I get this going in IE?
 
 Thanks!
 --DIZZLE
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-change-value-of-select-dropdown--tf2308098.html#a6433015
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] JTip Issue with IE

2006-09-21 Thread Rey Bango


Hi Karl,

Thanks for the followup. I really appreciate you trying to help me bud. 
Its one of the best part of Jquery; the community support.

The iframe insertion code you wrote works like a charm and its nice and 
clean. I think I'm going to use it instead. :o)

This though:

#JT {
   overflow: hidden;
 }

caused the arrow image to disappear. Not sure why.

Rey...


 That's great, Rey! Glad you got it worked out. I'm curious, though,  
 if that works without doing this, too:
 
#JT {
  overflow: hidden;
}
 
 I tried to solve your case, too, and did it very similarly, with just  
 a couple differences:
 - Added everything you did in global.css EXCEPT for the height and  
 width.
 
 - Put this right after div is created in jtip.js:
 
if ($.browser.msie) {
   $('#JT').prepend('iframe id=jTipiFrame/iframe');
   var iwidth = (params['width']*1+79) + px;
   $('#jTipiFrame').width(iwidth).height('450px'); 
}
 
 So, I made the width the same as that of the jTip, and I made the  
 height ... um ... 450px. That's my one sticking point. If I set #JT  
 to overflow:hidden, I can give #jTipiFrame a ridiculous height; if  
 I don't, I get scrollbars on hover. I tried to give it the same  
 height as that of #JT, but apparently the #JT height is computed  
 before it's loaded. The overflow: hidden, on the other hand, cuts  
 off some of your text.
 
 Oh well, it was worth a try anyway. If you're interested in seeing my  
 version of your test page, go to
 http://test.learningjquery.com/jtiptest.htm
 (Note: I didn't upload the little arrow images, so it won't look  
 perfect)
 
 Cheers,
 
 Karl
 ___
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


Re: [jQuery] JTip Issue with IE

2006-09-21 Thread Rey Bango
Hi Karl,

Here's an example of how the images are showing up. If I remove the 
overflow: hidden, they show up.

http://www.intoajax.com/jtiptest.htm

Rey

Karl Swedberg wrote:
 On Sep 21, 2006, at 11:45 AM, Rey Bango wrote:
 
 
Solved!! Thanks to Yehuda Katz for pointing me over to the jQuery date
picker plugin which had a IE hack that resolved the issue!

I took some code from the date picker plugin and update JTip.  
Here's the
code for anyone interested:

global.css (added):

#JT iframe
{
  display:none;/*sorry for IE5*/
  display/**/:block;/*sorry for IE5*/
  position:absolute;
  top:0;
  left:0;
  z-index:-1;
  filter:mask();
  width:3000px;
  height:3000px;
}

jtip.js (added immediately after the JT div is created):

if ($.browser.msie) {
  
/ we put a styled iframe behind the calendar so HTML SELECT elements
don't show through
  
 $('#JT').append(document.createElement('iframe'));
  
} 
 
 
 That's great, Rey! Glad you got it worked out. I'm curious, though,  
 if that works without doing this, too:
 
#JT {
  overflow: hidden;
}
 
 I tried to solve your case, too, and did it very similarly, with just  
 a couple differences:
 - Added everything you did in global.css EXCEPT for the height and  
 width.
 
 - Put this right after div is created in jtip.js:
 
if ($.browser.msie) {
   $('#JT').prepend('iframe id=jTipiFrame/iframe');
   var iwidth = (params['width']*1+79) + px;
   $('#jTipiFrame').width(iwidth).height('450px'); 
}
 
 So, I made the width the same as that of the jTip, and I made the  
 height ... um ... 450px. That's my one sticking point. If I set #JT  
 to overflow:hidden, I can give #jTipiFrame a ridiculous height; if  
 I don't, I get scrollbars on hover. I tried to give it the same  
 height as that of #JT, but apparently the #JT height is computed  
 before it's loaded. The overflow: hidden, on the other hand, cuts  
 off some of your text.
 
 Oh well, it was worth a try anyway. If you're interested in seeing my  
 version of your test page, go to
 http://test.learningjquery.com/jtiptest.htm
 (Note: I didn't upload the little arrow images, so it won't look  
 perfect)
 
 Cheers,
 
 Karl
 ___
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


[jQuery] Running jQuery when already have $() from prototype

2006-09-21 Thread Carlos Aguayo
Hi everyone,
Is there any update with the issue of using the dollar function $ from
prototype when migrating to jQuery?
Thanks!
Carlos

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


Re: [jQuery] Running jQuery when already have $() from prototype

2006-09-21 Thread Rey Bango
Hi Carlos,

You may have already seen this article but I'll send you the link just 
in case:

http://jquery.com/docs/PrototypeAndJQuery/

Hope that helps.

Rey

Carlos Aguayo wrote:
 Hi everyone,
 Is there any update with the issue of using the dollar function $ from
 prototype when migrating to jQuery?
 Thanks!
 Carlos
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


[jQuery] Small change to JTip

2006-09-21 Thread Rey Bango
I wanted to be able to define my own cursor in JTip via the URL passed 
and didn't see a way of doing it so I modified the JTip code slightly to 
do this:

Before:

if(params['link'] !== undefined){
$('#' + linkId).bind('click',function(){window.location = params['link']});
$('#' + linkId).css('cursor','pointer');
}
After:

if(params['cursor'] === undefined){params['cursor'] = 'pointer'};

$('#' + linkId).css('cursor', params['cursor']);

if(params['link'] !== undefined){
$('#' + linkId).bind('click',function(){window.location = params['link']});
}

You can then specify the cursor in the URL like this:

href=mypage.htm?cursor=crosshair

Feedback is appreciated.

Rey...

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


Re: [jQuery] Interface: draggables, droppables, and sortables

2006-09-21 Thread Brendan O'Brien
Bryan,What you're trying to do is exactly what I want as well. The approach I had was to make the container Droppable and Sortable. But like I said in my original email you can't do this because Sortable hijacks the Droppable functionality. I was just looking for a way to use both on the same container. If there wasn't a good workaround, then I was thinking something like Sortable having its own separate functionality, instead of overwriting the Droppable functionality that you may have already added. So it would still use Droppables, but in its own space, if that makes any sense. Because I don't want it to overwrite the onDrop callback, for example. I was using onDrop to create new elements, just as Bryan described. I see that in Stefan's example he is using the onStop callbacks of Draggable to create the element. I didn't use this originally because it doesn't give you the container that the Draggable was dropped in, but onDrop does. And I need the container.
And speaking of the demo, I agree with Bryan that the demo isn't perfect. I also would like to use ghosting to drag from my pallette, but that doesn't really work now. And I also agree that Droppables is obsolete. Which is not good, because like I said I need to use onDrop, not onStop.
Anyway, the reason I wrote the original email was to1. Point out that since Sortables hijacks any previously defined Droppables, the two cannot be used together in the same container.2. See if there was a workaround for it. I wasn't necessarily asking for a code change (unless there was no workable solution).
So if there is a workaround (without the new change), I'd love to hear it. Bryan, maybe you have some ideas? And if so, maybe we should go back to the original functionality.Thanks,Brendan
On 9/21/06, bbuchs [EMAIL PROTECTED] wrote:
Sorry, but I just had another tought...The demos I initially provided were simplified - my end goal is not to justmove an DOM element from one side of the page to another. What I was tryingto accomplish was that the dropping would initiate a function that creates a
brand new DOM element that is quite different from the one that had beendragged. I suppose I should have made that clearer from the start. - bryanbbuchs wrote: Stefan, I hate to harp on this, but the more I work with your new
 draggables automatically become sortables function, the less i like it. While the demo you created certainly works, I have a couple of issues with it. First, from a usability perspective, I would want to turn ghosting on for
 the items in the pallette; doing that currently breaks the demo. Right now, if a user drags an item in the pallette, it appears as if it's being removed, not cloned. I'm sure this will be fixed eventually.
 Secondly, your code change more or less makes droppables obsolete, and unless your objective is to do exactly what Brendan had set out to do, it's unintuitive logic. If I have something I want to drag, I would also
 have something to drop it on. Converting it into a sortable object is not the most likely use case scenario. Instead, wouldn't the SortableAddItem function be the more logical solution?
 I don't want to give the impression that I'm not grateful for your contributions - I AM! I just think that you reacted so quickly to one person's feature request and may not have considered what it meant in the
 bigger picture for everyone else. bbuchs wrote: Brendan, Thanks for doing a good job explaining what I was trying to - the 
jQuery.iSort.helper.get bug. I would hope that this can be fixed. I can see a situation where I might want to have a list on a page that isn't a sortable until a user initiates that action (click here to sort
 this list). If I have any other draggables on the page, I would get the error described below. Your tip about the accepts paramater also works great. I still strongly disagree that draggables should automatically become
 part of a sortable if it's dropped in one, but at least I can work around it. The only remaining issue I have is that the draggablesortable feature breaks the ghosting functionality for the draggable. In my demo, the
 right-side draggables are essentially a palette of items. The user should be dragging out a copy of each item, not the item itself. Again, that can be accounted for if the ghosting bug is fixed.
 Thanks guys! - Bryan Brendan O'Brien wrote: Hi, I'm responding to a few things in this post.
 First, I took a look at Bryan's example pages.The problem you see on the second page (where isortables.js has been included, but no Sortables have been declared) that throws the error |jQuery.iSort.helper.get is
 not a function|; I've had this problem too even before the Sep. 11 patch.The problem is that when isortables has been included, then draggables attempts to execute the line:
 jQuery.iSort.helper.get(0).style.display = 'none' when dragging over a droppable to hide the sortable helper.But since you never called Sortables this variable is just the boolean value
 false.It 

[jQuery] toggleClass and removeClass

2006-09-21 Thread Mark D. Lincoln








George,



I noticed the reports of this bug. Unfortunately, it
was annoying me in the jQuery stuff I was working on, so I looked for a
solution. I just figured I would save someone else the headache of
tracking it down.



Mark
D. Lincoln



Mark D. Lincoln, Director of Research  Development

Eye On Solutions, LLC

(866) 253-9366x101

www.eyeonsolutions.com








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


[jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Rey Bango
I saw this posting:

http://mikeomatic.net/techtips/css-crossfader/

and it showed a really cool fader. So I duplicated it using JQuery:

http://www.intoajax.com/fade.htm

The cool thing is that I didn't need to load scriptaculous to do it.

Enjoy!

Rey...

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


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Webunity | Gilles van den Hoven
Rey Bango wrote:
 I saw this posting:

 http://mikeomatic.net/techtips/css-crossfader/

 and it showed a really cool fader. So I duplicated it using JQuery:

 http://www.intoajax.com/fade.htm

 The cool thing is that I didn't need to load scriptaculous to do it.
   
Nice stuff! I was wondering how much effort it would be with jQuery 
since i need this on a new project of me ;)

Thanx

Gilles

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


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Rey Bango
Sweet! It was real easy to do and JQuery had all of the stuff built in 
to do it.

Definitely look at the comments on the original post here:

http://mikeomatic.net/?p=78

Dustin Diaz was commenting on how to do it without a lib. Good stuff.

Rey...

Webunity | Gilles van den Hoven wrote:
 Rey Bango wrote:
 
I saw this posting:

http://mikeomatic.net/techtips/css-crossfader/

and it showed a really cool fader. So I duplicated it using JQuery:

http://www.intoajax.com/fade.htm

The cool thing is that I didn't need to load scriptaculous to do it.
  
 
 Nice stuff! I was wondering how much effort it would be with jQuery 
 since i need this on a new project of me ;)
 
 Thanx
 
 Gilles
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


Re: [jQuery] JTip Issue with IE

2006-09-21 Thread Kelvin Luck
Rey Bango wrote:
 Solved!! Thanks to Yehuda Katz for pointing me over to the jQuery date 
 picker plugin which had a IE hack that resolved the issue!
 
...
 This solved the issue!
 
 Thanks go out to Yehuda for pointing me in the right direction and 
 Kelvin Luck for developing the workaround!

Just to give credit where it's due, the workaround came from:

http://www.hedgerwow.com/360/bugs/css-select-free.html

Cheers,

Kelvin :)

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


Re: [jQuery] Reminder: Magazine Release Imminent

2006-09-21 Thread Yehuda Katz
Sorry for the delay. We're working hard on delivering a quality product. Issue 1 should be out before you wake up tomorrow morning. Keep an eye out!-- YehudaOn 9/21/06, 
Tim Gossett [EMAIL PROTECTED] wrote:
 Just a reminder that issue 1 of the Visual jQuery Magazine is set to be released tonight. Keep an eye out!Has it been released yet?--Tim___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/-- Yehuda Katz
Web Developer | Wycats Designs(ph)718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread dizzledorf

Rey,


Looks good.  Just one minor niggle on your demo: the rounded box is
out-of-whack in IE6.

Nice work!


--DIZZLE



Rey Bango-2 wrote:
 
 I saw this posting:
 
 http://mikeomatic.net/techtips/css-crossfader/
 
 and it showed a really cool fader. So I duplicated it using JQuery:
 
 http://www.intoajax.com/fade.htm
 
 The cool thing is that I didn't need to load scriptaculous to do it.
 
 Enjoy!
 
 Rey...
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/Fader-code-I-duplicated-using-JQuery-tf2314431.html#a6436656
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Rey Bango
Hey Dizzle, thanks for the heads up. Someone else pointed that out to me 
as well. Check it out again and be sure to refresh your cache.

Rey...

dizzledorf wrote:
 Rey,
 
 
 Looks good.  Just one minor niggle on your demo: the rounded box is
 out-of-whack in IE6.
 
 Nice work!
 
 
 --DIZZLE
 
 
 
 Rey Bango-2 wrote:
 
I saw this posting:

http://mikeomatic.net/techtips/css-crossfader/

and it showed a really cool fader. So I duplicated it using JQuery:

http://www.intoajax.com/fade.htm

The cool thing is that I didn't need to load scriptaculous to do it.

Enjoy!

Rey...

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


 
 

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


Re: [jQuery] Reminder: Magazine Release Imminent

2006-09-21 Thread Tim Gossett
 Sorry for the delay. We're working hard on delivering a quality product.
 Issue 1 should be out before you wake up tomorrow morning. Keep an eye out!

 -- Yehuda

I don't know–I usually get up at the crack of 1pm. That's a pretty
harsh deadline for you guys ;)

I appreciate the effort. Looking forward to it.

--
Tim

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


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Klaus Hartl
Rey, that's cool, will use it sometime!

A little tip: you are serving the demo page as text/html, therefore you 
shouldn't include an xml prologue:

?xml version=1.0 encoding=utf-8?

Because it isn't xml. Besides that IE is thrown into Quirks mode which 
can cause you some headache...


Cheers, Klaus




Rey Bango schrieb:
 I saw this posting:
 
 http://mikeomatic.net/techtips/css-crossfader/
 
 and it showed a really cool fader. So I duplicated it using JQuery:
 
 http://www.intoajax.com/fade.htm
 
 The cool thing is that I didn't need to load scriptaculous to do it.
 
 Enjoy!
 
 Rey...
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


Re: [jQuery] JTip Issue with IE

2006-09-21 Thread Rey Bango
Sweet!

Kelvin Luck wrote:

 
 Just to give credit where it's due, the workaround came from:
 
 http://www.hedgerwow.com/360/bugs/css-select-free.html
 
 Cheers,
 
 Kelvin :)
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


[jQuery] jQuery::PeriodicalUpdater ?

2006-09-21 Thread Webunity | Gilles van den Hoven
Anybody did a periodical updater plugin like the scriptaculous one?

I hope all plugin developers put there plugin on: http://jquery.com/plugins/

Thanx

Gilles

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


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Rey Bango
Thanks for the heads up Klaus! I basically took the source from Mike's 
page and just modified it using JQuery. I should've been more cognizant 
of that.

Thanks again!

Rey...

Klaus Hartl wrote:
 Rey, that's cool, will use it sometime!
 
 A little tip: you are serving the demo page as text/html, therefore you 
 shouldn't include an xml prologue:
 
 ?xml version=1.0 encoding=utf-8?
 
 Because it isn't xml. Besides that IE is thrown into Quirks mode which 
 can cause you some headache...
 
 
 Cheers, Klaus
 
 
 
 
 Rey Bango schrieb:
 
I saw this posting:

http://mikeomatic.net/techtips/css-crossfader/

and it showed a really cool fader. So I duplicated it using JQuery:

http://www.intoajax.com/fade.htm

The cool thing is that I didn't need to load scriptaculous to do it.

Enjoy!

Rey...

___
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] document.ready IE iframe

2006-09-21 Thread Blair McKenzie
I haven't tried it, but you could try simply putting the code at the end of the html instead of in ready.BlairOn 9/22/06, Arash Yalpani 
[EMAIL PROTECTED] wrote:Hi all,I have a page(1) with an iframe, where the iframe loads a
second-party-web page(2). Now, if I open (1), I want to do someJS-Action, whenever (1) is completely loaded. This works great in FF andOpera!You can test it here:
http://newsride.org/discuss/?uriId=17The comments on the left side should load almost immediately in FF /Opera. It basically works like this:$(document).ready(function(){loadComments();
})But if you look at the same page in IE, you will get a different result.IE waits until the content of the iframe - the external web page (2) onthe right side - was completely loaded until it starts to execute
$(document).ready.What I like to happen is that document.ready starts, whenever thesurrounding web page (1) is loaded, not the intrinsic iframed page (2).Any ideas why document.ready behaves differently. Is there any
workaround for that?Thanks,Arash___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface: draggables, droppables, and sortables

2006-09-21 Thread bbuchs

Stefan (I hope you're listening in!)

Brendan and I have been trading messages about this off-list, and came to
the same conclusion: 

Please roll back the code to the old sortables  draggables methods

Although the methods you added to insert draggables into any sortables is
neat, it lacks the powerful callback abilities that the original
drag/drop/sort functions had. And since it would be possible to replicate
the draggablesortable functions using those original callback methods, it
seems to make sense to go back.

Please feel free to contact me directly if you'd like to disucss off-list.

--
Bryan Buchs
[EMAIL PROTECTED]




Brendan O wrote:
 
 Bryan,
 
 What you're trying to do is exactly what I want as well.  The approach I
 had
 was to make the container Droppable and Sortable.  But like I said in my
 original email you can't do this because Sortable hijacks the Droppable
 functionality.  I was just looking for a way to use both on the same
 container.  If there wasn't a good workaround, then I was thinking
 something
 like Sortable having its own separate functionality, instead of
 overwriting
 the Droppable functionality that you may have already added.  So it would
 still use Droppables, but in its own space, if that makes any sense.
 Because I don't want it to overwrite the onDrop callback, for example.  I
 was using onDrop to create new elements, just as Bryan described.  I see
 that in Stefan's example he is using the onStop callbacks of Draggable to
 create the element.  I didn't use this originally because it doesn't give
 you the container that the Draggable was dropped in, but onDrop does.  And
 I
 need the container.
 
 And speaking of the demo, I agree with Bryan that the demo isn't perfect. 
 I
 also would like to use ghosting to drag from my pallette, but that doesn't
 really work now.  And I also agree that Droppables is obsolete.  Which is
 not good, because like I said I need to use onDrop, not onStop.
 
 Anyway, the reason I wrote the original email was to
 1. Point out that since Sortables hijacks any previously defined
 Droppables,
 the two cannot be used together in the same container.
 2. See if there was a workaround for it.  I wasn't necessarily asking for
 a
 code change (unless there was no workable solution).
 
 So if there is a workaround (without the new change), I'd love to hear it.
 Bryan, maybe you have some ideas?  And if so, maybe we should go back to
 the
 original functionality.
 
 Thanks,
 Brendan
 
 On 9/21/06, bbuchs [EMAIL PROTECTED] wrote:


 Sorry, but I just had another tought...

 The demos I initially provided were simplified - my end goal is not to
 just
 move an DOM element from one side of the page to another. What I was
 trying
 to accomplish was that the dropping would initiate a function that
 creates
 a
 brand new DOM element that is quite different from the one that had been
 dragged. I suppose I should have made that clearer from the start.

 - bryan




 bbuchs wrote:
 
  Stefan, I hate to harp on this, but the more I work with your new
  draggables automatically become sortables function, the less i like
 it.
  While the demo you created certainly works, I have a couple of issues
 with
  it.
 
  First, from a usability perspective, I would want to turn ghosting on
 for
  the items in the pallette; doing that currently breaks the demo.
 Right
  now, if a user drags an item in the pallette, it appears as if it's
 being
  removed, not cloned. I'm sure this will be fixed eventually.
 
  Secondly, your code change more or less makes droppables obsolete,
 and
  unless your objective is to do exactly what Brendan had set out to do,
  it's unintuitive logic. If I have something I want to drag, I would
 also
  have something to drop it on. Converting it into a sortable object is
 not
  the most likely use case scenario. Instead, wouldn't the
 SortableAddItem
  function be the more logical solution?
 
  I don't want to give the impression that I'm not grateful for your
  contributions - I AM! I just think that you reacted so quickly to one
  person's feature request and may not have considered what it meant in
 the
  bigger picture for everyone else.
 
 
 
 
 
  bbuchs wrote:
 
  Brendan, Thanks for doing a good job explaining what I was trying to -
  the jQuery.iSort.helper.get bug. I would hope that this can be
 fixed.
  I can see a situation where I might want to have a list on a page that
  isn't a sortable until a user initiates that action (click here to
 sort
  this list). If I have any other draggables on the page, I would get
 the
  error described below. Your tip about the accepts paramater also
 works
  great.
 
  I still strongly disagree that draggables should automatically become
  part of a sortable if it's dropped in one, but at least I can work
  around it.
 
  The only remaining issue I have is that the draggablesortable feature
  breaks the ghosting functionality for the draggable. In my demo, the
  right-side draggables are 

Re: [jQuery] code ideas: if mouseover for 5 seconds then do this elsedo nothi ng

2006-09-21 Thread Dave Cohen
On Thursday 14 September 2006 11:04, Lewis, David wrote:
 I think that this should be possible by creating a time delay function
 [setTimeout()] that is started on the mouseover event and cancelling the
 timer delay function [clearTimeout()] on the mouseout event. 

I too did something like this.  You can get the code from my demo page:
http://www.dave-cohen.com/node/1186

Daniel Ruiz wrote:

 Basically the client I have doesn't want to use onclick to open a hidden
 navigation but they also don't like the mouseover because a user may
 move over it by accident. What they want is something in between so a
 user can move over a link to open the nav but have to hold it there for
 a couple of seconds for it to trigger the function to show the nav.

This is exactly what my 'hovertips' do, see the above link.  The tips appear 
if the mouse hovers over the active text for long enough.  They disappear, 
but also after a short delay, so the user can move the mouse from the active 
text to the popup text.  As long as the mouse is over either the active text 
or the popup, the popup will not disappear.

-Dave

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


Re: [jQuery] jQuery::PeriodicalUpdater ?

2006-09-21 Thread Will Arp
there is a bug on line 35 and 40 of file heartbeat.js:
change $.heartbeat to $.jheartbeat

..or in line 7:
change $.jheartbeat to $.heartbeat

;)
will

On 21-set-06, at 23:30, Rey Bango wrote:

 http://www.jasons-toolbox.com/JHeartbeat/


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


Re: [jQuery] Google map plugin idea

2006-09-21 Thread Dylan Verheul
On 9/21/06, Tim Gossett [EMAIL PROTECTED] wrote:
 You have a bug with your default Lat and Long values.

I was lazy :-) thanks for the heads up, it's better now.

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