Re: [jQuery] jButton released!

2006-09-29 Thread yoyo


Webunity | Gilles van den Hoven wrote:
 
 I just finished my new plugin and would like to receive some feedback! I 
 wrote a new plugin which can transform an image into a button.

But what if my users do not have javascript enabled?

Ideal solution will be like that: in code I use button for submits, and
checkbox for on/off actions, an then jButton should replace that elements
with images :) This way when users do not use javascript it nicely degrates.

Just my $0.02.

Beside it - great plutin :)
-- 
View this message in context: 
http://www.nabble.com/jButton-released%21-tf2343470.html#a6524222
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] jButton released!

2006-09-28 Thread Webunity | Gilles van den Hoven
abba bryant wrote:
 mind fixing the demo link so we don't all have to look at a 403 page?
   
As i posted in another thread, the jButton code is now located at:
http://gilles.jquery.com/jButton/

Sorry for the 403's!

-- Gilles

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


Re: [jQuery] jButton released!

2006-09-28 Thread John Resig
 How about the point mentioned by Dave about the _this (that i really
 should not use that because of some closure stuff)?

I took the liberty of re-working your code to use closures, instead of
_this. Also, it now works with multiple images (You can do:
$(img').iButton() and it'll work over all of them).

You can find the modified code here:
http://john.jquery.com/plugins/jButton.js

One quick item: You call your plugin jButton, but the method is named
iButton - did you mean to call it jButton? Maybe just .button() would
be sufficient.

--John

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


[jQuery] jButton released!

2006-09-27 Thread Webunity | Gilles van den Hoven
Hello guys!

I just finished my new plugin and would like to receive some feedback! I 
wrote a new plugin which can transform an image into a button.

Features include:
* Toggle button or a default button
* You can provide a function or string as the action to take when the 
button is clicked. In case of a function, the function gets called. In 
case of a string, the button is wrapped by an href tag and the link is 
called.
* In case of a toggle button, you can preset the state it is in.
* The option to create 2 different styles of buttons. You can either 
create default IMG buttons (which swappes a preloaded image and uses 3 
seperate images) or you can use CSS style swapping, which uses 1 image 
as background, and the backgroundPosition property.

You can check out the demo here:
http://www.webunity.nl/_test/jquery/jButton/

Waiting for your feedback!!

-- Gilles

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


Re: [jQuery] jButton released!

2006-09-27 Thread Paul Bakaus
Hi,great idea! I did something like this a coupl of weeks before for a touchscreen project, but I couldn't use jQuery (what a pity). This plugin looks like I wanted it to be :)2006/9/27, Webunity | Gilles van den Hoven 
[EMAIL PROTECTED]:Hello guys!I just finished my new plugin and would like to receive some feedback! I
wrote a new plugin which can transform an image into a button.Features include:* Toggle button or a default button* You can provide a function or string as the action to take when thebutton is clicked. In case of a function, the function gets called. In
case of a string, the button is wrapped by an href tag and the link iscalled.* In case of a toggle button, you can preset the state it is in.* The option to create 2 different styles of buttons. You can either
create default IMG buttons (which swappes a preloaded image and uses 3seperate images) or you can use CSS style swapping, which uses 1 imageas background, and the backgroundPosition property.
You can check out the demo here:http://www.webunity.nl/_test/jquery/jButton/Waiting for your feedback!!-- Gilles___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/-- Paul Bakaus
Web DeveloperHildastr. 3579102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jButton released!

2006-09-27 Thread Dave Methvin
 I wrote a new plugin which can transform an image into a button.
 You can check out the demo here:
 http://www.webunity.nl/_test/jquery/jButton/

I like the features. It would be better if the markup was a button and the
plugin replaced or changed that as needed. Buttons can have an ACCESSKEY
attribute for accelerator keys (When ACCESSKEY=G, the button is clicked
when you hit Alt-G) and I really like keyboard shortcuts. Using a button
also holds closer to the semantic markup meme that everyone loves nowadays.

This is an interesting design dilemma:

 this.cfgButton = { ... };

Where this is the jQuery object with the images to be converted to
buttons. It's actually one of the documented ways for plugins to have
options, see http://jquery.com/docs/Plugins/Authoring/ . However, if someone
were to try and chain multiple uses of iButton on the jQuery same object,
the later call would clobber cfgButton from an earlier call. Also, one of
the reasons for using an object attached to the jQuery object is to avoid a
closure. In this case the jQuery object is used inside the mouse event
handlers (aliased as _this) so the closure happens anyway. 

Some good messages have gone around about plugin design. I have wanted to
draw those together and expand the Authoring page so we would have a set of
best practices, but I have been too darned busy lately. 


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