[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Guy Fraser
Matt Kruse wrote:
 On Sep 2, 2:45 pm, Guyon  Morée [EMAIL PROTECTED] wrote:
   
 Even though, Chrome seems to be a little bit faster than FF and quite
 a lot faster than IE, it has 2 failed tests:
 - 64: core module: text(String) (1, 3, 4)
 

I think everyone is missing the whole point of Chrome: It's designed to 
kill MSIE on corporate networks - http://tinyurl.com/68lvhb

Guy


[jQuery] Re: New Google Browser announced

2008-09-03 Thread Guy Fraser
Andy Matthews wrote:
 Microsoft can't retire IE6 any more than Ford could retire 1996 Ford 
 Explorers. It has to be the user's choice. What's a better suggestion 
 is for WEBSITES to stop supporting IE6 (coding CSS and JS fixes and 
 workarounds) and encourage people to upgrade on their own.

I think Chrome will sit alongside MSIE - allowing old stuff to be slowly 
retired while all the new stuff is done through Chrome. More verbose 
version: http://tinyurl.com/68lvhb

Guy


[jQuery] Re: New Google Browser announced

2008-09-03 Thread Guy Fraser

Ryan Zec wrote:
 I don't think chrome his wanting to compete with firefox.  From what 


If they were to compete with FF I think the dev community would start 
voicing some serious concerns. Not in google's best interests.


[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Guy Fraser

Ca-Phun Ung wrote:
 Chrome is pretty exciting as it's not just another browser but one that 
 sets to up-the-bar. I think it definitely gives other vendors food for 
 thought. As to whether it would kill IE? I'm sure it will take some of 
 IE's share but only after exhausting FF, Opera and Safari's market... I 
 expected this list to be more excited about V8 rather than Chrome itself ;)
   

I really don't think it will eat in to FF, Opera and Safari - eg, you're 
not going to see Chrome running on Nintendo Wii, it's not going to be 
the pre-installed browser on OS X and developers aren't going to give up 
Firefox and all it's developer extensions over night.

I really do think it's targeted at corporate intranets and home users 
who won't switch from MSIE.


[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Guy Fraser

Bil Corry wrote:
 My comment was written in the context of the quote I replied to.  Guy 
 Fraser wrote that Chrome was designed to kill MSIE on corporate 
 networks.  If that is the case, then the fact that Google will also 
 save money from the conversion of Firefox users certainly doesn't hurt 
 either (from Google's perspective).  I was subtly suggesting that 
 while it may be accidental that Google is saving itself some revenue, 
 it may also be intentional.  It'll be interesting to see if Google 
 ever offers Chrome-only features or services, which would entice users 
 to switch to Chrome.

Google have confirmed that they will be working with Mozilla until at 
least 2011 - can't remember where I read it but it was announced recently.

 From google's perspective, any modern browser will serve their needs 
IMHO - however, MSIE (including the now not standard mode by default on 
intranets any more version 8 *sigh*) MUST die.

With M$ playing around with unwanted features like web slices, rather 
than making a browser that actually works, Google have a strong 
incentive to kill off MSIE from the corporate networks (and remainder of 
MSIE on home computers) in any way they can. As an industry, we just 
can't move forward (properly) until MSIE is destroyed.

Guy


[jQuery] Re: New Plugin - Agile Carousel - Looking For FeedBack

2008-09-03 Thread Guy Fraser

MorningZ wrote:
 Looks like it still needs some work, as looking at the first demo page

 http://www.5bosses.com/examples/agile_carousel//jqueryui_example/slideshow.html
   

The nav bar could do with using sliding doors rollover technique to 
prevent buttons from disappearing while images load on mouse over.

Looks like it would also be really useful for a slideshow plugin!

Guy


[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Guy Fraser

[EMAIL PROTECTED] wrote:
 Yup John believes TraceMonkey is much better than v8

There are some bits of TraceMonkey that aren't yet complete - it's those 
bits that will tip the balance. There was a recent article on 
ajaxian.com about it:

http://ajaxian.com/archives/brendan-discusses-how-tracemonkey-is-climbing-faster-ruby-on-the-web-with-v8


[jQuery] Re: Proof of concept: Animated data grid/table jquery plugin with sorting and pagination and somewhat lightweight

2008-09-02 Thread Guy Fraser

Mike Nichols wrote:
 sweet...i implemented natural sorting in tablesorter but it never got
 put in so I am thrilled to see it baked into your implementation...
 looks good


Does the natural sort work with Unicode chars (Chinese, Norwegian, etc)?


[jQuery] Re: New Google Browser announced

2008-09-02 Thread Guy Fraser

Geoffrey wrote:
 The browser is being written with WebKit, the open-source engine at
 the core of Apple's Safari and Google's Android. The browser is also
 getting a new Javascript virtual machine, V8. It's said to be a better
 solution for complex and rich Web applications--it should yield better
 performance as well as smoother drag and drops in interactive
 applications. 
   


At least Google take open web standards seriously, as does the webkit 
team so hopefully it won't be another MSIE and it'll be regularly 
updated to fix bugs, etc. Will be interesting to see what the 
performance gains are like.


[jQuery] Re: JQuery Introduction

2008-09-02 Thread Guy Fraser

Sikandar123456 wrote:
 A very good lecture on jquery 

 http://saqibshehzad.blogspot.com/2008/09/jquery.html
   

John Resig has a Mini Me! :D

http://www.austinpowers.com/objects/desktops/minime_1280x960.jpg

Sorry, couldn't resist.

I'll get my coat...


[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-02 Thread Guy Fraser

Matt Kruse wrote:
 This appears to be a bad assumption in the jQuery tests.

 The code in param() calls:
 for ( var j in a )
 and makes the assumption that the keys will be returned in the same
 order they are specified. This is not an assumption that should be
 made, so the test should be changed to allow for the returned string
 to be in arbitrary key order.
   

I've never seen an ECMA script compiler (JS, AS, etc) that doesn't 
iterate through named references in the expected order?

Guy


[jQuery] Re: Superfish - Evenly spread menu through entire width of ul

2008-08-27 Thread Guy Fraser

Ara wrote:
 Quick question (hopefully quick).  I'm trying to use superfish to
 create a nav bar style menu, this all works as advertised, however
 I've set the width of the ul to be 960px, I'd like all the li's to
 spread evenly through the entire 960px.

 The default behavior is squished to the left, I know I could fix this
 manually using margins, padding, borders, etc ... however I would like
 more of a table style layout using ul, li's and superfish.

 Anyone try this before?  I don't think I need to paste any examples,
 I'm using the stock examples from 
 http://users.tpg.com.au/j_birch/plugins/superfish/.
   

I think you need to use the supersubs plugin - see the with Supersubs 
tab on the demo page.


[jQuery] Re: ui.dialog Accessibility (Screen Readers)

2008-08-27 Thread Guy Fraser

Richard D. Worth wrote:
 http://groups.google.com/group/jquery-a11y

That group could do with deleting the porno spam :s


[jQuery] Re: Preview: Password validation and strength meter

2008-08-21 Thread Guy Fraser

Jörn Zaefferer wrote:
 Code is here: http://dev.jquery.com/view/trunk/plugins/validate.password/
 A demo here: http://dev.jquery.com/view/trunk/plugins/validate.password/demo/
 To get an idea how passwords are rated, check out the tests:
 http://dev.jquery.com/view/trunk/plugins/validate.password/test/rating.js
   


Looks nice - would it be possible to get the strength meter underneath 
the password text box so the form looks more balanced?

Also, ability to define a custom Tips/Help link to appear above the bar, 
left side - eg. I might want to provide a page with hints/tips about how 
to set a strong password.

Guy


[jQuery] Re: Preview: Password validation and strength meter

2008-08-21 Thread Guy Fraser

Jörn Zaefferer wrote:
 Code is here: http://dev.jquery.com/view/trunk/plugins/validate.password/
 A demo here: http://dev.jquery.com/view/trunk/plugins/validate.password/demo/
 To get an idea how passwords are rated, check out the tests:
 http://dev.jquery.com/view/trunk/plugins/validate.password/test/rating.js
   

Also, would be nice to set which tests are done - eg. if an app has case 
insensitive pwd's there's no point telling a user their pwd is good if 
they have a mix of lower/upper-case which in this scenario would be 
irrelevant.


[jQuery] Re: IE - 'object does not support this property or method'

2008-08-21 Thread Guy Fraser

pedalpete wrote:
 I've written a bit of jquery code which I am absolutely amazed works
 on both Safari and FF, but IE is giving me errors.
   

Not sure if it's same error, but this MS KB article may help: 
http://support.microsoft.com/kb/933873


[jQuery] Re: [PLUGIN] Tweet! Added Twitter to your website

2008-06-15 Thread Guy Fraser
Rey Bango wrote:

 Found on Twitter:

 Announcing Tweet (http://tweet.seaofclouds.com/), a simple @jquery 
 plugin to put Twitter on your website.

 Rey...

Pity they are sticking stuff on String.prototype :( Aside from that, 
nice plugin.


[jQuery] [OT] Re: [jQuery] Re: anti IE6

2008-06-09 Thread Guy Fraser
MorningZ wrote:
 Any many huge corporations and govt branches are slow to update as
 well  it's certainly not their fault, so why would you
 purposefully annoy them?
   
Because if you don't annoy them, they keep using IE6, and we have to 
keep putting up with the pain of supporting it.

Many web developers still have the crazy notion that we should support 
IE6. However, doing so only causes us more pain because people using IE6 
mistakenly believe that they have a good browser and therefore never get 
rid of it so the pain continues.

The only feasible way to kill off IE6 is to simply stop supporting it. 
When the customer or end-user complains, explain that their browser is 
broken and that they should upgrade to a free, modern browser like 
Firefox, Opera or Safari/Webkit.

Think about it, if your car was broken would you expect all the roads in 
the country to be modified to counter the broken car? No, it would be 
ludicrous. The broken car would be fixed or destroyed for the good of 
humanity.

Yet, it seems, in the web world we continue this crazy self-destructive 
act of supporting the most widespread and heavily broken browser the 
entire planet has ever encountered. It has to stop.

There's nothing stopping large organisations from installing a modern 
browser alongside IE6 - IE6 can then still be used for their broken 
intranet, the modern browser can be used for everything else.

Visit: http://www.savethedevelopers.org


[jQuery] Re: Popup window

2008-04-10 Thread Guy Fraser

Josh Nathanson wrote:

 Hey Paul,

 There isn't really any jQuery code that helps with this, but I've got 
 a little plugin jqURL that can make it a bit easier:

 http://www.oakcitygraphics.com/jquery/jqURL/jqURLdemo.html

 It has a function loc so if you want to popup a window you can do this:

 $.jqURL(myfile.html, {w:400,h:400,wintype:'_blank'});


Wouldn't the wintype property be better named target?


[jQuery] Event namespacing - how to see the full event name?

2008-03-25 Thread Guy Fraser
Hi,

I've been triggering several events as follows:

$('.foo').trigger('bar.update');
$('.foo').trigger('bar.show');

etc...

If I listen to the bar event on foo:

$('.foo').bind('bar', function(e) {
  // e.type = 'bar'
});

The event type property is always bar - how do I work out if 
bar.update vs. bar.show was triggered?

I might be misunderstanding the event system (or more accurately it's 
namespacing) but I imagined that I could listen to a specific bar event:

$('.foo').bind('bar.update', handler);

Or all bar events (bar.update, bar.show, etc):

$('.foo').bind('bar', handler);

When listening to all of them with a single handler, it would be useful 
for the handler to see the full event name (bar.update instead of just 
bar) so I could switch on event type inside the handler.

I guess I could achieve the required effect using event data, but it 
seems such a waste not to have the full event name in the event type (or 
possibly a .name property could contain it?)

Any ideas?

Guy


[jQuery] Re: Event namespacing - how to see the full event name?

2008-03-25 Thread Guy Fraser
Yeah, I thought I'd have to use the data feature, it just seems a shame 
not to have a property on event that provides that info.

I did some digging in the jQuery source and found that i's trivial to 
expose the namespaced event type by inserting the following in to the 
handle() method before line 2059 in the current public release of 1.2.3:

event.namespaced = event.type;

With that added, all events then have a .namespaced property on the 
event parameter allowing you to see exactly which event was called and 
switch on it :)

I've submitted a feature request, including an example scenario and 
code: http://dev.jquery.com/ticket/2585

Guy


Andy Matthews wrote:
 You're allowed to pass in an array object along with each trigger 
 method call.
  
 So this might work for you:
  
 var call = 1;
 $('.foo').trigger('bar.update',[call]]);
  
 var call = 2;
 $('.foo').trigger('bar.update',[call]]);
  
 $('.foo').bind('bar', function(e,data) {
 if (data[0] == 1) {
 // I came from call 1
 } else {
 // i came from call 2
 }
 });



[jQuery] Re: general unique id for new append element

2007-12-23 Thread Guy Fraser


 On Dec 23, 5:09 am, dn2965 [EMAIL PROTECTED] wrote:
   
 hello everyone
 i want to know a way to general unique id for new append element. like
 EXT's  .id();
 

I don't think there is any equivalent in jQuery at present. It would be 
useful though as I've had several occasions myself when such a feature 
would be useful.

For anyone not familiar with the feature in Ext, it basically gives you 
a guaranteed unique ID (ie. checks there are no other ids or names with 
same value in the document).

Guy


[jQuery] Re: internet explorer debugging

2007-12-21 Thread Guy Fraser
Stefan Petre wrote:
 Maybe this helps http://www.debugbar.com/
I've yet to work out how that thing allows /debugging/ - it's got some 
basic features for looking at various aspects of the page, but it's 
hardly a debugger IMHO?

There is a free Microsoft Script Debugger (MSD), but it's pants and 
quickly gets confused by even slightly complex pages.

There is also a Microsoft Script Editor (MSE) which comes with MS 
Office 2003+ (and possibly also FrontPage). It's far better than MSD but 
still pretty pants, as you would expect from MS.

http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html

If you want to splash the cash, you could use Microsoft Visual Studio 
but that seems like overkill to me just to get decent debugging in the 
browser.

There's Firebug Lite which you can embed in your pages, but I haven't 
tried it so don't know what it's like.

http://www.getfirebug.com/lite.html

I ended up using Aptana (specifically the professional version) which 
seems to generally help me track down and solve problems, although I've 
not yet worked out how to pre-set breakpoints on sites where the JS is 
on the server and not directly accessible to me - eg. a script within a 
.jar file in a J2EE app.

http://www.aptana.com/products/studio_professional.php

I blogged about my MSIE debugging hell:

http://www.adaptavist.com/display/~gfraser/2007/11/09/Script+debugging+in+MS+Internet+Exploder

Guy


[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread Guy Fraser

Shawn wrote:
 The actual how-to's are at http://jquery.open2space.com/howto.  And if 
 you'd like to contribute, I have some quick instructions and guidelines 
 at http://jquery.open2space.com/node/2.
   

Sweet! Could you add a section on debugging / browser tools? Feel free 
to rob anything from the following pages on our site:

http://www.adaptavist.com/display/~gfraser/2007/11/09/Script+debugging+in+MS+Internet+Exploder
(there's some good links in the comments also - picked them up from a 
recent topic on this list about debugging in IE)

http://www.adaptavist.com/display/USERGUIDE/Firefox+Extensions+for+CSS
(and yes, I know Opera is arguably more standards-compliant than FF, but 
I'm an FF fanboy :p)

Guy


[jQuery] Re: Stupid little game :)

2007-12-19 Thread Guy Fraser

Stefan Petre wrote:

 Hi,

 I did a small game (it was a test for a client), about 6kb of code. 
 http://www.eyecon.ro/slotmachine/
 Stefan

musthave   nudge!



[jQuery] Re: Re[jQuery] naming JAddTo plugin

2007-12-17 Thread Guy Fraser

Jason Levine wrote:
 As I put more features into my JAddTo plugin, it's quickly turning from a
 Add To These Social Networking Sites plugin into a more general Add a
 list of links plugin.  Given this, I was thinking of renaming it.  What do
 you think of JLinksList?  I'm open to suggestions if anyone has a good
 naming idea.

 The plugin-currently-known-as-JAddTo is available from:

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

 -Jason Levine
   

It would be cool if it was easier to override the defaults...

$.fn.JAddTo.defaults = {  }

That would make the defaults easily changeable from outside the plugin.

Then in the $.fn.JAddTo function:

var o = $.extend( {}, $.fn.JAddTo.defaults, options );

Then just use o.whatever instead of defaults.whatever within the function.

http://www.learningjquery.com/2007/10/a-plugin-development-pattern

Guy


[jQuery] Re: validation in IE6

2007-12-07 Thread Guy Fraser

[EMAIL PROTECTED] wrote:
 I am trying with validator 1.2 and metadata and I get an issue in all
 the browsers :

 jQuery(element).metadata is not a function

 Any help??
   
I'm guessing the plugin is assuming that you have the metadata plugin 
installed and borks when it's missing. That being said, it should really 
check to see if metadata is there before calling it?


[jQuery] Re: Sortable + Draggable/Sortable

2007-12-06 Thread Guy Fraser
danielpunt wrote:
 Hi all,

 I have two unordered lists and both its listitems are draggable and
 droppable on the other list. Until this point everything is working
 exactly as it should.

 But, one of the lists should be sortable, and thats where it goes
 wrong. The list isn't sortable and i get a lot of different errors.

 Can anybody help me?

 Example at: http://dev.danielpunt.nl/IA/lib/jQueryTest/
   
I tried doing something similar to this but using only sortables:

http://test.adaptavist.com

I ran in to this problem: http://dev.jquery.com/ticket/2004

(and a few others that you'll quickly spot)


[jQuery] Re: [PLUGINS] More from DZone

2007-12-06 Thread Guy Fraser

Rey Bango wrote:
 Splitter by Dave Methvin

 http://methvin.com/jquery/splitter/default.html


It's a pity there isn't an easy way to deal with snapping of divs to 
their containing element...

Something like:

$('#div1').snap('top'); // sets width to that of container and snaps the 
div to the top of container
$('#div2').snap('left'); // sets height to that of container and snaps 
the div to the left of the container
$('#div3').snap('client'); // sets width and height to that of container 
and snaps div to 0,0 of the container

Adding a few simple events would then make it super easy to create 
border layouts - a splitter would just be a div snapped to one of the 
edges (top/bottom/left/right) with some drag ability - as it's dragged, 
events would cause the other divs to resize accordingly.

I've got some old actionscript code lying around somewhere that 
implements a snapping framework (including stuff like splitters, etc) - 
I'll find it and post it online if anyone is interested in doing a 
snapping plugin?

Guy


[jQuery] Re: [NEWS] Getting jQuery Adopted in Corporations

2007-12-06 Thread Guy Fraser

[EMAIL PROTECTED] wrote:
 Although I keep coming up against the following:

 1. Is jQuery going to be here for the long term?
 2. Why not use prototype, what are the benefits of jQuery over it?
   

We're hitting those two questions on a regular basis. The first is 
pretty easy to deal with - jQuery is growing rapidly both in terms of 
available plugins and sites using it. It also has books, blogs and 
vibrant community.

As for the second one, that's a problem. Prototype is entrenched in a 
lot of organisations and developers don't like ditching their tried and 
tested libraries for something new.

However, in certain circumstances Prototype is a major nightmare because 
it's not namespaced - drop it in to a portal environment and generally 
everything goes pearshaped.

Guy


[jQuery] Re: Ann: Flot 0.1 released

2007-12-05 Thread Guy Fraser

Ole Laursen wrote:
 The thing is that a good tick generator for the Gregorian calendar
 would go about generating ticks differently than a good tick generator
 for ordinary scalar values. For instance, if the plot displays half a
 year of time, there should be ticks for when the months start instead
 of some arbitrary days.
   

Take a look at the Datejs.com library - it has lots of useful methods 
for working with dates and I believe they also plan to later implement 
it as a jQuery plugin.

Now we'll just sit back and wait to you find a way of implementing this 
sort of thing: http://simile.mit.edu/timeline

*hides*


[jQuery] CSS JS Library - is there a jQuery equivalent?

2007-11-29 Thread Guy Fraser
Another sweet thing found on Ajaxian: 
http://feeds.feedburner.com/~r/ajaxian/~3/192351009/new-css-javascript-library

There was recently a thread regarding a jQuery plugin which dealt with 
CSS but I can't find it now. Anyway, would it be possible to get 
something like that library in to jQuery as a plugin? I don't want to 
add Mootools to my UI :o

Guy


[jQuery] SITE: Genfavicon

2007-11-29 Thread Guy Fraser
Nothing to do with me but spotted this via Ajaxian - it uses jQuery for 
it's DOM and Ajax work:

http://www.genfavicon.com/

Original Ajaxian article:

http://feeds.feedburner.com/~r/ajaxian/~3/192329297/genfavicon-a-favicon-generator


[jQuery] Re: [ANNOUNCE] New plugin - HeatColor

2007-11-29 Thread Guy Fraser

Josh Nathanson wrote:
 Examples and downloads:
 http://www.jnathanson.com/blog/client/jquery/heatcolor/heatcolor.html

 Comments/suggestions welcome!

That's really sweet! :D

I believe there was a plugin that could work out most-used words on a 
page and combined with this plugin it would be a superb heatmap of 
words. I can also see uses in all sorts of tag clouds as well :D


[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread Guy Fraser

Rey Bango wrote:
 Mootools itself is not the best for interfaces. Mootool users, though, 
 appear to go to great length to style their apps nicely.


It's a pity there isn't more cross-pollination between jQuery and 
Mootools. Both are great libraries, but I have a strong preference for 
jQuery because it's conceptually perfect IMHO. It would be great if some 
of the Mootools devs would make their work available as jQuery plugins.


[jQuery] Slightly OT: Datejs - jQuery-like date chaining

2007-11-27 Thread Guy Fraser
Just spotted this via Ajaxian:

http://www.datejs.com/

It's got jQuery-like syntax for working with dates:

// What date is next thrusday?
Date.today().next().thursday();
 
// Add 3 days to Today
Date.today().add(3).days();
 
// Is today Friday?
Date.today().is().friday();
 
// Set to 8:30 AM on the 15th day of the month
Date.today().set({ day: 15, hour: 8, mintue: 30 });

Unfortunately it splooges methods and properties all over the Date and 
Number prototypes and objects, but this got me thinking...

Would it be possible to implement things like this with jQuery? 
Currently plugins add their methods to $.fn, however what if we could 
add other plugin namespaces such as $.date where methods could be 
added and then have some way of telling jQuery which plugin namespace to 
use?

You could possibly have:

$.date(tomorrow).is().friday(); // is tomorrow friday?

Guy


[jQuery] Re: jQuery.Rule 0.9

2007-11-22 Thread Guy Fraser
Flesler wrote:
 The plugin is meant to work well in IE6 and FF2, Windows, that's what
 I tested on. CSS rules are quite buggy among browsers, so I don't
 think it will survive in most untested environments.
 Example: http://www.freewebs.com/flesler/jQuery.Rule/
   

I did some testing on Windows platform...

The example page seems to work perfectly in

* IE 7.0.5730.11
* Firefox 2.0.0.9
* Firefox 3.0b1

Opera 9.24 has trouble with .remove() - the following had no effect:

$.rule('#content ul','style').remove();
$.rule('textarea','link').remove();
$.rule('span','link').remove();
$.rule('button','link').remove();

The other things worked in Opera though so it's getting there ;)

I've not tested in any other browsers (or versions of browsers).

I assume there is some way to say get the styles applied to element X 
and apply the same styles to element Y?

Guy


[jQuery] Re: disabling jQuery in older browsers

2007-11-22 Thread Guy Fraser

If it's purely older versions of IE where you want to disable it, use a 
conditional comment around a script block.

matisse wrote:
 hi all,


 because of the code and stylesheets complexity, I have to disable
 javaScript entirely in IE 5.5 .
 I have a few js files with $(document).ready(function() in them. my
 current solution is to put the following lines right in the begining
 of the function:

   // IE 5.5 and lesser aren't supported
   if ($.browser.msie  $.browser.version  6) {
   return false;
   }


 is there any possibility to do in a global way? something like
 jQuery.disable or jQuery.ignoreAll?
 what is the best practice for this kind of gracefull degradation in
 jQuery?
   



[jQuery] jQ UI: sortable and draggable...

2007-11-22 Thread Guy Fraser
Hi,

I'm struggling to mix the effects of sortable and draggable...

I have two divs, each containing items that I want to be both draggable 
and sortable.

Pseudo code:

div class=list id=list1
   div class=itemfoo/div
   div class=itembar/div
   div class=itemmoo/div
/div

div class=list id=list2
   div class=itemchimp/div
   div class=itemfish/div
   div class=itemmarmoset/div
/div

I want to configure it so that if I drag an item within it's containing 
list, it'll just do normal sortable stuff - this is easy to do:

$('list').sortable({items:'.item'});

But I also want to be able to drag stuff from one list to the other - 
eg. drag foo from #list1 in to #list2

And when I drag foo to #list2 I want to have the sortable effect work 
so that if I drag it between chimp and fish, then fish and 
marmoset will move down to make room for foo.

I'm completely stumped as to how to achieve this - any ideas?

Guy


[jQuery] Re: jQ UI: sortable and draggable...

2007-11-22 Thread Guy Fraser
Managed to sort this out - I simply applied the sortable to an outer div 
(that wrapped my two list divs) and it works like a charm :)

Guy Fraser wrote:
 div class=list id=list1
div class=itemfoo/div
div class=itembar/div
div class=itemmoo/div
 /div

 div class=list id=list2
div class=itemchimp/div
div class=itemfish/div
div class=itemmarmoset/div
 /div

 I want to configure it so that if I drag an item within it's 
 containing list, it'll just do normal sortable stuff - this is easy to do:

 $('list').sortable({items:'.item'});

 But I also want to be able to drag stuff from one list to the other - 
 eg. drag foo from #list1 in to #list2

 And when I drag foo to #list2 I want to have the sortable effect 
 work so that if I drag it between chimp and fish, then fish and 
 marmoset will move down to make room for foo.


[jQuery] Re: new plugin: jClocke

2007-11-20 Thread Guy Fraser
dbzz wrote:
 i have been working on a plugin and have gotten to the point where i
 think i need some feedback. i'm sure there are bugs and code that
 could be better or is just bad practice. i haven't done any docs or
 extensive demos - this is just sort of a proof of concept. so have a
 look and feel welcome to reply.

 http://briskey.com/jClocke
   
That's pretty awesome! With regards to using it as a method to select a 
time, it would be useful if there were also HH:MM:SS (AM/PM) text boxes 
somehow integrated so I can just type in the time if desired.

Guy


[jQuery] Canvas based Mocha UI

2007-11-20 Thread Guy Fraser
For anyone who hasn't seen it yet, this is pretty awesome:

http://ajaxian.com/archives/mocha-ui-mootools-canvas-ui-class

Wasn't John working on some canvas stuff? Maybe we'll see a jQuery 
canvas-based UI?

http://ejohn.org/blog/sneak-peek/

http://ejohn.org/blog/sneaky-2/

Guy


[jQuery] Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

2007-11-15 Thread Guy Fraser

cfdvlpr wrote:
 My IE 7 doesn't seem to support PNGs like yours does.

 How about in the head:

 !--[if lt IE 7.]
script type=text/javascript src=/jquery/plugins/
 jquery.ifixpng.js/script
 ![endif]--
 !--[if gte IE 7.]
script defer type=text/javascript src=/javascript/pngfix.js/
 script
 ![endif]--
   

Why are you doing this:

!--[if gte IE 7.]
   script defer type=text/javascript src=/javascript/pngfix.js/script
![endif]--


IE7 natively supports PNG alpha transparency as background images and normal 
images. No need to do any png fixing in IE7 and any attempt to do so will 
probably make things worse.



[jQuery] Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

2007-11-14 Thread Guy Fraser

cfdvlpr wrote:
 I'm just trying this nice jquery plugin and it works great to solve
 some of my IE 6 PNG image problems.  But, in IE 7, the images are
 black.  Has anyone else seen this and found a fix for it?  Is this a
 problem specifically with PNG 24 alpha transparency?
   

IE7 natively supports PNG images - so make sure the plugin detects IE7 
and doesn't run. We used a conditional comment around the script tag to 
prevent IE7 processing it...

!--[if lte IE 7.]
  script 
![endif]--





[jQuery] Re: Scriptdoc-file for jQuery 1.2.1

2007-11-14 Thread Guy Fraser

Brandon Aaron wrote:
 jQuery 1.2 has removed the scriptdoc from the source in favor of
 managing documentation via the wiki (http://docs.jquery.com/).
   

Shame, it would have been nice to have it in Aptana Studio - I was 
wondering why I wasn't getting code hints, etc.


[jQuery] Re: Why plugin repository dont have a search?

2007-11-14 Thread Guy Fraser

Jean wrote:
   Always when i come to find some plugin i have to click to browse by
 name and use the search of Firefox to find what i want, so why dont
 have any search field?
   

The wiki's search might work...? Alternatively use the All Plugins  
(under Browse Plugins on the left) then use Ctrl + F to get your browser 
in-page search feature ;)


[jQuery] Re: ANNOUNCE: tinyEdit v.1.0 plugin for jQuery released

2007-11-13 Thread Guy Fraser

Giant Jam Sandwich wrote:
 Any suggestions or issues, please let me know. Thanks!
   

Sweet plugin, tiny codebase too! :D

Is it possible to implement different types of tags - eg. bbcode or wiki 
notation?


[jQuery] Re: ANNOUNCE: tinyEdit v.1.0 plugin for jQuery released

2007-11-13 Thread Guy Fraser

Karl Swedberg wrote:
 Not sure what Brian's plans are for implementing different types of 
 tags, but if you need that functionality now, there is another 
 excellent plugin called jTagEditor:
 http://www.jaysalvat.com/jquery/jtageditor/


Oooh! That's almost exactly what I'm after - it looks like it's based on 
an old version of jQuery though: 1.1.3.1

I'm going to see if I can merge the two plugins together somehow (and 
also try and clone myself in the process as there just aren't enough 
hours in the day!) as there are elements of each I really like :)

Guy


[jQuery] Re: Easing cheat sheet demo page

2007-11-13 Thread Guy Fraser
Glen Lipka wrote:
 I just couldn't get my head around the new easing naming conventions.

 So I made a cheat sheet demo page.
 http://www.commadot.com/jquery/easing.php

That and the related links really need a mention in the jQuery docs/wiki 
- superb resources, many thanks!!

Guy


[jQuery] Re: Ingrid, jQuery Datagrid : Update, v0.9.1

2007-11-12 Thread Guy Fraser

Andy Matthews wrote:
 I found it REALLY slow in IE7 using the bells and whistles demo. Clicking
 one of the column headers to sort on took several seconds. The loading bar
 was a very nice effect, but there's no reason it should have taken that
 long, not with only  20 or 30 rows.

 I'd work on speed increases before any more feature development.

The sorting on that demo is done server side so it was prolly the ajax 
call that took several seconds if the server was under load. The reason 
that one was sorting server side, I assume, is that the table was paged 
so sorting affects which results appear on which page.


[jQuery] Re: Online tutorials

2007-11-11 Thread Guy Fraser

I can highly recommend the Learning jQuery book from PACKT Publishing. 
As well as being a great way to learn about jQuery it also gives you a 
fair bit of info about JavaScript as well.

Merc wrote:
 Hi,

 I am an experienced programmer. I work with Drupal. I have no
 experience in Javascript, and every time I need anything I have to ask
 for help (see previous message).
 I was wondering if you could give me a list of pointers to:

 1) A good tutorial about pure javascript aimed at programmers. I
 need something crisp and clear

 2) A good step-by-step tutorial on how to use JQuery. The previous
 tutorial(s) would need to be enough to understand this one

 Any help would be highly appreciated! And... apologies if this is a
 FAQ.

 Merc.

   



[jQuery] Re: Display message for users with incompat. browsers?

2007-11-11 Thread Guy Fraser

Wizzud wrote:
 You could perform your own browser sniffing and put up a warning if
 you detect the use of a not-fully-supported browser, to the effect
 that some things *may* not work!
 Possibly a bit off-putting for the visitor?
 (Also bear in mind that some browsers can lie about about what they
I guess this comes back to the recent discussion of browser sniffing vs. 
feature testing. With browser sniffing you don't really know what will 
happen on a non-supported browser - it may work, but it might not or 
somewhere in between.


[jQuery] Re: Tablesorter + pager question/bug?

2007-11-11 Thread Guy Fraser

Preston Hunt wrote:
 And change the number of display entries from 10 to 20 (or any other
 value), the pager div does not get moved to below the table.  It
 instead ends up on top of the middle of the table.  Happens in Firefox
 2 and IE7.
   

The #pager div is absolutely positioned using CSS. It would possibly be 
better to relatively position it instead.


[jQuery] Re: Display message for users with incompat. browsers?

2007-11-09 Thread Guy Fraser

MadMapper wrote:
 I'd like to show a message (display a div) for users who show up with
 a browser that jQuery doesnt fully support - what's the best
 approach?  Will jQuery work on old browsers, just not perfectly?
   

Add the div like this:

div id=no-jqueryyour message to the user here/div

then:

$(function(){ $('#no-jquery').hide(); });


So if jQuery is alive, it will hide the div. Then again, it might be 
alive but not working very well depending on the browser :s


[jQuery] Using jQuery to create XML

2007-11-08 Thread Guy Fraser
Hi,

Are there any examples of using jQuery to create some XML and then 
traversing that XML and modifying it?

Guy


[jQuery] Re: Major Problem With Dom Traversal

2007-11-08 Thread Guy Fraser

Could you not just use .eq(0) to get the first style node and append to 
that?

Flesler wrote:
 And that worked? if you have more than one style node, you would be
 appending that to more than one, causing some overhead.
 You could try this:

 var $style = $('#my_style');

 if( $style.length == 0 )
 $style = $('style').attr('type','text/
 css').attr('id','my_style').appendTo('head');

  $style.text(.siteWidth{width:  + modifiedW +});//add 'px' if
 modifiedW lacks it
   



[jQuery] Re: Scripts at the bottom of the page

2007-11-05 Thread Guy Fraser

Sean Catchpole wrote:
 Is there a good reason why placing scripts at the bottom of a page is
 a bad idea?

 By placing them in the head all javascript files must be downloaded
 before the rest of the page can render. This seems odd since most of
 the time the javascript needs to wait for the page to be loaded
 anyway. Other than perhaps organizational issues, are there any good
 reasons why having the script tags at the bottom of the page is a bad
 idea?
   

According to YSlow docs, putting JS as far down the page as possible is 
beneficial.


[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread Guy Fraser

prit wrote:
 But recently I noticed a website http://mootools.net/slickspeed/ which
 compares 3 frameworks including jQuery. I ran the tests on that site
 and noticed that they show jQuery as the slowest performer out of the
 3 frameworks (Mootools, Prototype and jQuery).

 Does anybody have comments on this ?
   

jQuery isn't the fastest library (although it's getting faster all the 
time). The things to bear in mind:

1. It's the smallest library = pages download faster so even if the JS 
is a fraction of a second slower, you won't notice the difference

2. Code that uses jQuery is generally very concise = smaller pages = 
faster downloads

3. In real-world use the effects of most normal JS is negligible 
compared to the time it takes to download images, etc.


[jQuery] Re: [NEWS] Site Using jQuery: TurboTax.com

2007-11-01 Thread Guy Fraser

polyrhythmic wrote:
 I think they just change the text size - I don't see an animation with
 firefox, the text is either large or small.  Note that the button does
 not change size, so I don't think it's an actual 'zoom'. ...Unless you
 guys see something different?
   

Ah, you are correct, it's just setting different classes on the panels 
and they snap to the larger size as a result - no zooming involved.


[jQuery] Re: [NEWS] Site Using jQuery: TurboTax.com

2007-10-31 Thread Guy Fraser
Glen Lipka wrote:
 http://turbotax.intuit.com

That rocks! I love the use of hover intent on the basic/delux/etc panels 
- which plugin was used to do that?



[jQuery] Re: [NEWS] Site Using jQuery: TurboTax.com

2007-10-31 Thread Guy Fraser

Lee Hinde wrote:
 http://cherne.net/brian/resources/jquery.hoverIntent.html

 On 10/31/07, Guy Fraser [EMAIL PROTECTED] wrote:
   
  That rocks! I love the use of hover intent on the basic/delux/etc panels -
 which plugin was used to do that?
 

Oops - I should have been more specific - what plugin is used to zoom 
out the panels when you hover over them? I particularly like the way 
the text scales smoothly. There's so much JS used on that site that I 
can't see the college for the fish :s


[jQuery] Re: Wait plugin

2007-10-30 Thread Guy Fraser
polyrhythmic wrote:
 It is a very useful tool but I don't think it's ready for the jQuery
 core yet, as you can see there are very complicated and very simple
 ways to wait/pause the jQuery execution chain -- we'd have to
 standardize a method first.
   

I think this makes a good first impression but the .then starts to 
annoy me after a while (looking at the code I can see why it's there, 
but it still feels superfluous --- I don't get to use that word very 
often!):

|$('#myNode').wait(2).then.hide();|


And of course, it's code is pretty heavy compared to the Pause plugin. I 
do prefer .wait() to .pause() though. Although maybe .pause() would be 
more palatable if .unpause() was renamed to .continue(), .resume() or 
.play()?

Meh, 5am and I need sleep. nn


[jQuery] Re: Jquery and safari

2007-10-24 Thread Guy Fraser
[EMAIL PROTECTED] wrote:
 I am running safari 2.0.4 and jquery 1.2.1. None, and I mean none of
 my javascript works in safari. All of it works fine in firefox and
 most of it works in ie. Is this just a problem with jquery or am I
 missing something?

   
Safari is pants :)


[jQuery] Re: New plugin: File Style

2007-10-24 Thread Guy Fraser

Dan G. Switzer, II wrote:
 Mike,

 Looks good. One tip to reduce the code. You could re-write your multiple
 css() calls that look like:

 var wrapper = $(div)
   .css({
 width: settings.imagewidth + px
   , height: settings.imageheight + px
   , background: url( + settings.image + ) 0 0 no-repeat
   , background-position: right
   , display: inline
   , position: absolute
   , overflow: hidden
   , cursor: pointer
   });
   

Sweet, I didn't know you could do multiple properties in the one 
function call like that :)


[jQuery] Re: MIT Licence question very important for everyone

2007-10-24 Thread Guy Fraser

Ecommercant wrote:
 Hi

 I use jquery in my php applicastion and then i begin to sell my soft,
 so the entier application becomes under MIT license ?

 So i'll be obliged to provide not encoded copies of all codes sources
 or only framework and other sub scripts supplied as MIT in my soft ?
   

No, the MIT license is not viral. If you chose to use the MIT license 
for the jQuery stuff then you can use it in commercial apps, etc., 
without it affecting the license of your own stuff. I tend to think of 
MIT license as the same as BSD.

However, if you use the GPL license then that *is* viral and you'd have 
to release your own stuff under GPL.

jQuery and most of it's plugins are available dual-licensed under MIT 
and GPL - just chose the one that suits you best, in your case MIT.


[jQuery] Re: CSS image replacement problem

2007-10-24 Thread Guy Fraser

bjreed wrote:
  $(#sec-adv).each(function(){
   
 $(#page-photo).css('background-image','url(../images/pagepic.jpg)'); 
  });
   


Why are you using .each() ? Surely this would be better:

$(#sec-adv #page-photo).css('background-image','url(whatever)');


[jQuery] Re: New plugin: File Style

2007-10-23 Thread Guy Fraser
Sweet plugin. Is it possible to have roll-over images, etc? Also, is 
this method accessible - ie. will screen readers still be able to output 
meaningful instructions?
 On 10/23/07, *Mika Tuupola* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:


 Not being able to style file inputs is long time problem. File Style
 to the rescue!  It enables you to style file inputs and makes your AD
 happy.

 http://www.appelsiini.net/projects/filestyle
 http://www.appelsiini.net/projects/filestyle/demo.html

 I would appreciate all feedback. Especially from IE7 users. Does the
 file browser open when you click on different Choose file buttons?




[jQuery] Re: Prevent comment SPAM with jQuery

2007-10-23 Thread Guy Fraser

Most spammers will look at a site and work out how comments are 
submitted - that being the case, they'd completely bypass the actual 
filling in of the form and simply post directly to the server.

Codex wrote:
 Hey people,

 I came up with an idea to help fight comment spam, the stuff most of
 us hate. It's just an idea, maybe it won't even work. But take a look
 and tell me what you think, or tell me why this won't work. It's
 basically a captcha that requires user action with draggables/
 droppables.

 http://www.strezlab.com/dropcomment.html

 I'd love to hear what you guys think!

 Gavin

 PS: Yeah, this should be in the UI-section, which it is, but I thought
 here might be a good place too.

   



[jQuery] Re: Prevent comment SPAM with jQuery

2007-10-23 Thread Guy Fraser

Alexandre Plennevaux wrote:
 a much more safe way is to use a very obvious email input field that you
 hide via CSS. Then you check on the serverside, if that field has received a
 value, then it's most probably a bot, because normal users won't see it,
 thus not fill it in. of course, not perfect not either since screenreaders
 will have it displayed. But i heard it's possible to control and hide stuff
 for screenreaders.
   


Even that won't work - spammers will often post a comment manually and 
watch the HTTP traffic using something like Ethereal to see exactly what 
gets sent to the server. Then they just grab that and automate the 
process and voila, comment spam!

You'd do much better to use something like re-captcha: http://recaptcha.net/

Guy


[jQuery] Re: [NEWS] Humanized Messages

2007-10-18 Thread Guy Fraser

Michael Geary wrote:
 1) It displays messages at the top and bottom of the screen at the same
 time, fighting for your attention - and the less important message - the one
 at the bottom - is more eye-catching because of the animation.
   

Yeah - it would be nice if it the message log was turned in to a 
separate plugin as there are loads of places where I would want to use 
that on it's own. In fact, not just a message log but slide-out panels 
fixed to an edge of the screen.

 2) It is much too eager to dismiss the message on mouse movement. Don't you
 naturally move the mouse around on a page as you look at it? I do. At least
 I use a TrackPoint, so it's easy to avoid inadvertent mouse movement. If you
 use a conventional mouse, it can be difficult to avoid any mouse movement
 after a click.
   

Yeah, I have to agree with this. There should ideally be some delay 
after a mouse move before dismissing the message. Also, it would be nice 
if the message location could be easily customised - eg. to show the 
message next to a button or something.

Guy


[jQuery] Re: [NEWS] liScroll Plugin

2007-10-17 Thread Guy Fraser

GianCarlo Mingati wrote:
 Hi all.
 http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html
 This is my scrolling news ticker plugin for jQuery.
   

Nice plugin. Would it be possible to have the plugin automatically add 
the divs and the class to the ul? That way any unordered list could be 
turned in to a ticker without modifying the source HTML. This would be 
particularly useful in portal systems where it's often impossible to get 
the raw HTML changed at source.

It would also be nice if you could make it compatible with the Hover 
Intent plugin - when available, this would allow the ticker to continue 
scrolling if the mouse quickly passes over it (eg. if I'm just moving 
the mouse to some other link outside the ticker, but the mouse goes over 
the ticker en-route): http://jquery.com/plugins/project/hoverIntent

BTW, I was extremely impressed by the brevity of the code :)

Guy


[jQuery] Re: ANNOUCE: jQuery lightBox plugin

2007-10-15 Thread Guy Fraser

Kia Niskavaara wrote:
 Maby you can use the data: URI kitchen to construct your own data: URLs?

 Like this:
 logo.src = 
 'data:image/gif;base64,R0lGODlhDQAOAJEAANno6wBmZgAAACH5BAAA'+
  
 'LAANAA4AQAIjjI8Iyw3GhACSQecutsFV3nzgNi7SVEbo06lZa66LRib2UQAAOw%3D%3D';

 More info:
 http://diveintogreasemonkey.org/patterns/add-image.html

Not compatible with all browsers IIRC...


[jQuery] Re: One-liner that accelerates JavaScript on IE

2007-10-12 Thread Guy Fraser
Glen Lipka wrote:
 http://commadot.com/jquery/experiments/speedtest/#
 I modified a version of jQuery to include that one line and it threw a 
 JS error.
 Then I tried using the second way with the var doc = document and 
 renamed document everywhere to be doc.
 No change at all in speed.

Having run that test a few times in FF 2.0.0.7 I noticed that the 
tweaked jQuery (which also had smaller file size) seemed to be faster...


[jQuery] Re: How to clear setTimeout?

2007-10-10 Thread Guy Fraser

Sean O wrote:
   $(input).keyup(function(){
   var self = this;
   var upd = setTimeout( function() {
   updateField( $(self) );  // function outside $ scope to 
 update field
 contents in dB
   },6000);
   });
   

The upd var will only be available in your function - nothing outside 
can see it.

You need to define the var upd outside that function...

var upd;
$(..).keyup(function(){
 ...
 upd = setTimeout (
});



[jQuery] Re: ClueTip: Nice work, Karl!

2007-10-10 Thread Guy Fraser
Karl Swedberg wrote:
 Is anyone else having the same problem of not seeing anything remotely 
 like a demo or not seeing the lists of features (smart positioning, 
 flexible behavior, many option)?

All working fine for me and very obvious what it is and how to use it. 
However, the round corner examples at the bottom of the demo page don't 
work for me... (Firefox 2.0.0.7 WinXP)


[jQuery] Re: Figured it out

2007-10-08 Thread Guy Fraser

jarrod wrote:
 Right after I posted I realized that it was because the element was hidden.
 I changed the method to first show the element, then get the offset and that
 works.
   


It would probably be useful if the dimensions plugin could handle that 
scenario...


[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Guy Fraser

GianCarlo Mingati wrote:
 the plugin now works with jquery 1.2 and the jquery.easing.1.2 plugin
 GC
   


URL?


[jQuery] Re: JSS - New Plug-in

2007-10-08 Thread Guy Fraser

Sam Collett wrote:
 I noticed that you have added String.prototype.trim. jQuery actually
 has this already, e.g. jQuery.trim( foo  );
   

Urg! No messing with core JS objects please - don't turn jQuery in to 
another Prototype :(

@ All developers: Please, please, please namespace stuff properly. This 
is one of the biggest advantages of jQuery.


[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Guy Fraser

GianCarlo Mingati wrote:
 http://www.gcmingati.net/wordpress/2007/09/12/seeing-it-burn-gives-me-the-chills/

 integrated in a post, as it was invented for.
   

That's pretty nice - would it be possible to make the images clickable 
so you progress to the next slide just by clicking the image?


[jQuery] Re: jQPanels

2007-10-08 Thread Guy Fraser

[EMAIL PROTECTED] wrote:
 @Daniele.
 I think I do not understand what you mean.
 Please give me more details ( I also speak italian if you need it).
   

If I understand correctly, the scenario would be that when one panel is 
opened the others would be closed - a bit like an accordion menu. Being 
able to close either all other panels on the page when one is opened or 
just a selection of panels that are somehow grouped togehter would be 
very useful.



[jQuery] Re: ANNOUCE: jQuery lightBox plugin

2007-10-07 Thread Guy Fraser

Leandro Vieira Pinho wrote:
 Guys,

 I have translate the jQuery lightBox plugin page into english. And, I
 have did a new layout too.

 See: http://leandrovieira.com/projects/jquery/lightbox/
   

Excellent work!

One feature request though - mainly for usability. It's not immediately 
apparent that you can mouse-over the image to see the next/prev and 
click to get next/previous image. Would it be possible to also show a 
next/prev text link below the image?

Guy


[jQuery] Re: ANNOUCE: jQuery lightBox plugin

2007-10-05 Thread Guy Fraser

Leandro Vieira Pinho wrote:
 The jQuery lightBox plugin 0.2 version are available.
   

Very nice plugin. Does the caption part of the box need to slide in 
every time the next/previous image is shown?


[jQuery] Re: Release: jQuery treeview plugin 1.3

2007-10-05 Thread Guy Fraser

Jörn Zaefferer wrote:
 If you need keyboard navigation, async loading and dd and similar 
 stuff you need to either wait for the UI tree component or take a look 
 at Ext's tree components. I don't plan to extend this plugin in them 
 mentioned direction: I want to keep it leightweight, providing 
 unobtrusive navigation enhancements.


Keyboard control would be the main one I guess, just for accessibility 
compliance and usability.

Another thing that would be useful is if root nodes didn't have the bit 
of connector line showing above their +/- box...

:D

Guy


[jQuery] Re: the jquery logo

2007-10-05 Thread Guy Fraser
Joel Birch wrote:
 I'm not sure about the permission to use that logo, but my complete
 guess would be that it's okay to use it. Otherwise, feel free to use
 the one I created, or not as you so choose:
 http://users.tpg.com.au/j_birch/plugins/superfish/img/jQuery-logo.gif

 Joel Birch.
   
That's much nicer than the official jQuery logo IMHO. Looks a lot 
cleaner and more modern and, dare I say, professional!

Guy


[jQuery] Re: jQuery Datagrid Plugin v.7

2007-10-04 Thread Guy Fraser

reconstrukt wrote:
 Hey all,

 I just released Just finished the initial release of my datagrid
 plugin.  I named her Ingrid. :)
   

She's one sexy grid! Can she be applied to existing static tables within 
a web page, to make them sexy?

Guy




[jQuery] Re: Performance feedback

2007-10-03 Thread Guy Fraser

jojet wrote:
 Hi all,
 this is my first message here so apologies if I'm breaking protocol!

 I have posted some code at a href=http://paste2.org/p/7819;
 http://paste2.org/p/7819/a
   

Well, one thing that will speed things up is to use chaining a bit more...

$(this).parent().removeClass(premListing).removeClass(freeListing);

The above ensures you're not doing the work of $(this).parent() twice.

Likewise:

$(this).attr(value).removeAttr('disabled');

That might only give marginal speed boost, but may help a little.

Guy


[jQuery] Re: IE6 - Operation Aborted - Any Ideas?

2007-10-03 Thread Guy Fraser

G[N]Urpreet Singh wrote:
 Once every few times the page is loaded in IE6, it just fails. It says 
 Operation Aborted and fails. Could anyone point me to why this is 
 happening. And this did not happen at all while the site was on my 
 local machine, it started when I put it up on a test server for client 
 review.

I've had that sometimes when I incorrectly tried modifying the DOM 
before it was ready...


[jQuery] Re: Release: jQuery treeview plugin 1.3

2007-10-03 Thread Guy Fraser

Jörn Zaefferer wrote:
 Okay, I've removed my stupid last minute optimization. Please give it 
 another try.

Yes, the +/- now work great :)

If you could match the feature set of the nlstree [1] it would be really 
awesome:

[1] http://www.addobject.com/products/javascript/tree/nlstree.php

Guy


[jQuery] Re: Masked Input Plugin 1.1

2007-10-02 Thread Guy Fraser

Josh Bush wrote:
 I just released version 1.1 of my Masked Input Plugin for jQuery. I
 have more features in the pipeline to add to 1.2, but I wanted to get
 a few fixes out the door before doing so. The only thing new this time
 is an unmask method.
   

Very nice indeed. However, I found the pattern hint on the Eye Script 
demo to be confusing - until I looked at the Usage tab and saw that ~ 
means + or - I had no idea what the first character should be.

It looks like your plugin will also be compatible with the overlabel 
plugin which is very sweet :D
http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/

Masked Input plugin + Overlabel plugin + whatever Form Validator plugin 
becomes the de-facto standard should result in some of the most flexible 
and functional form designs available :D

Guy


[jQuery] Re: Release: jQuery treeview plugin 1.3

2007-10-02 Thread Guy Fraser

Scott Trudeau wrote:
 Nice plugin.  I'm hoping to make use of it very soon.  I'm having 
 trouble with the demo (both on bassistance and on jquery docs).  
 Collapse All / Expand All / Toggle All seems to work, but clicking the 
 +/- does not.  Firebug reports no errors.  It renders poorly on IE.


I'm getting the same issue - clicking + or - has no effect. Other than 
that, it's shaping up to be a very sweet plugin.


[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Guy Fraser

Danjojo wrote:
 I am trying to clear an input search box's value.
   


If you are just wanting to display a prompt inside the search box, eg. 
search text, that will dissapear when the box receives focus, use the 
overlabel plugin...

http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/


[jQuery] Re: Plug-in Developers...

2007-10-01 Thread Guy Fraser

One thing I learnt recently is that just because you can use jQuery 
doesn't mean the innards of your plugin should be one big chain of 
jQuery methods.

For example, see Scott's Overlabel blog page...

Scott's original version used plain JS to do things, however it was a 
bit difficult to read:

http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/

Then Dave came along with a jQuery version of the same code which was 
more compact and easier to read:

http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/#comment-24144

Finally, Aristotle came along with a super-clean bit of JS that only 
used jQuery where it was absolutely necessary - this was far easier to 
read and as far as I can tell uses less method/function calls resulting 
in it also being a bit faster.

http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/#comment-24205

While I resisted at first, Aristotle proved to me that clean JS should 
be used wherever possible to aid readability of the code. He helped me 
kick my method chaining addiction within plugin code :) Note: Chaining 
is still very useful for general jQuery use, but should only be used 
sparingly within the plugin itself if possible.

Aristotle also noted that it /might/ be better to use jQuery.fn.extend() 
to define functions:

http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/#comment-24211

The comments system on the blog allowed other people to chip in with 
their own ideas, eg. support for JSF forms, support for existing forms 
where the HTML markup could not easily be changed, etc. The discussion 
enabled the plugin to be quickly polished to perfection (still some 
final tweaks to be made, eg. returning jQuery object to allow the method 
to be part of a chain).

Guy


[jQuery] Re: Catch a click event before the DOM is loaded

2007-10-01 Thread Guy Fraser

Remy Sharp wrote:
 I've recently been working on a project where the page is complex
 enough that the DOM would not have loaded before the user had spotted
 our 'big red button' - and clicked away.
   

Couldn't you just use this:

http://jquery.com/plugins/project/elementReady


[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Guy Fraser

Kevin Scholl wrote:
 http://jquery.com/plugins/project/toggleval
   

http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/


[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-28 Thread Guy Fraser
Brandon Aaron wrote:
 Speaking of that ... I've got a plugin ... unreleased/undocumented at 
 the moment ... called viewable. It gives you a percentage of the 
 element that is viewable.

 http://brandonaaron.net/jquery/plugins/viewable/test/test.html

That's pretty cool. How are you using it?


[jQuery] Re: My first tutorial: jQuery Rollovers

2007-09-28 Thread Guy Fraser

AJ wrote:
 I've decided to try my hand at some basic tutorials. The first is for
 basic reusable image rollovers for navbars, etc.

 You can find it here:
 http://www.atlantajones.com/2007/09/27/easy-reusable-image-rollovers-with-jquery/

 Any comments, suggestions or tips for making it better would be much
 appreciated!
   

Would it be possible to block quote the non-line-numbered bits of your 
tutorial. It wasn't immediately obvious (to me at least) that the two 
blocks of code after you set up the mouseover event are actually to go 
inside that event.. Block quoting the section would make it more obvious 
that it's specifically related to the mouse over event?


[jQuery] Re: functions after $.get work strange

2007-09-27 Thread Guy Fraser

Erik Beeson wrote:
 $.get is asynchronous, meaning the call to $.get returns immediately, 
 even before the callback has happened. To answer your specific 
 question, setting a variable who's scope is outside the callback is as 
 easy as defining the variable outside the callback:

Erik - your explanation was so clear and concise and packed with other 
very useful info, it should go on the jQuery wiki as a tutorial IMHO!

Guy


[jQuery] Re: filter not working when expression contains spaces

2007-09-27 Thread Guy Fraser

duff wrote:
 But then again, if the filters only apply to the element, why does it
 filter nothing regardless of the filter if it contains spaces ?.
 Shouldn't the filter return nothing if the expression cannot be
 evaluated ?(fail safe rather than silently)
   
+10

I concur - it should return nothing rather than everything, in the 
scenario where it can't evaluate. That way you a) instantly know 
something is wrong and b) don't end up with really odd things happening 
in places where you don't expect them.


[jQuery] Re: Enterprise Javascript?

2007-09-27 Thread Guy Fraser

Robert Koberg wrote:
 You don't need 1.6. The current version works in 1.4.

 You can get Rhino from mozilla (which is what is bundled in 1.6) at:

 http://www.mozilla.org/rhino/
   

The JSR 223 stuff in general works better on 1.6 though - especially 
things like Quercus (PHP in Java), etc.


[jQuery] Re: jCorner problem?

2007-09-27 Thread Guy Fraser

polyrhythmic wrote:
 I've seen that happen to me before when running .corner() on a floated
 element.  Corner tries to adapt properties from its parent from
 the .corner divs, so if you have some css like #container div { float:
 left; } the float will be applied to your .corner divs too, and bork
 your layout.  Corner works better with absolute or relative-ly
 positioned elements, consider wrapping the div you intend to .corner()
 in another div.
   

It would be ideal if corner could detect if the div is floated and 
accommodate :)


  1   2   >