[jQuery] Re: $("button").click(function () {$("p").toggle("slow"); for sevoral items.

2009-01-27 Thread Ricardo Tomasi
Or simply use the inner text, but that will cause issues if you have spaces in it. $('button').click(function () { var data = $(this).text().toLowerCase(); $('p.'+data).toggle('slow'); }); On Jan 27, 3:29 pm, Mike Alsup wrote: > > Is it possible to add : > >   > >   $(document).re

[jQuery] Re: $("button").click(function () {$("p").toggle("slow"); for sevoral items.

2009-01-27 Thread Mike Alsup
> Is it possible to add : >   >   $(document).ready(function(){ > >     $("button").click(function () { >       $("p").toggle("slow"); >     }); > >   }); >   > > that works for sevoral items, example, this is my menu : > > News button> > > Contact > > Staff button> > > Join button> > Forum

[jQuery] Re: Button Click

2008-07-11 Thread bin
you can user unbind $('#myButton').unbind("click") -- Original -- From: "Andy Matthews"<[EMAIL PROTECTED]>; Date: 2008年7月12日(星期六) 凌晨00:50 To: "jquery-en"; Subject: [jQuery] Re: Button Cl

[jQuery] Re: Button Click

2008-07-11 Thread shapper
No no, I already use Jquery for many things like: form validation, autocomplete, etc ... In this page I use only that and the only Javascript I have in my HTML markup is this one in this button ... this is why i am asking this. Thanks, Miguel On Jul 11, 5:50 pm, noon <[EMAIL PROTECTED]> wrote:

[jQuery] Re: Button Click

2008-07-11 Thread Andy Matthews
-Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sh

[jQuery] Re: Button Click

2008-07-11 Thread noon
Should you? Well if thats the only javascript on the page there isn't much point in including a library for something like that. However you could do it by saying: // jQuery's document ready $(function() { // grab the button and assign event $("#Cancel").click(function() { window.locatio