$('a#link').click(function(event) {
event.preventDefault();
$('div#bugDiv').slideToggle('slow');
});
You can do this as well.
On Wed, Dec 17, 2008 at 3:26 AM, Matt wrote:
>
> Worked perfectly. Thanks Michael and Mike!!
>
> On Dec 16, 6:43 am, Michael Price wrote:
> > Matt wr
Worked perfectly. Thanks Michael and Mike!!
On Dec 16, 6:43 am, Michael Price wrote:
> Matt wrote:
> > Hi everyone,
>
> > I'm very new to jQuery and am trying to have a div toggle between
> > hidden and shown using the slideToggle function. This is my code that
> > I have in the head of my html:
> Hi Matt
> I think the click handler will need wrapping in a function as well:
>
> $('a#link').click(function() {
> $('div#bugDiv').slideToggle('slow');
> return false;
>
> });
Ah! Good catch, Michael!
Matt wrote:
Hi everyone,
I'm very new to jQuery and am trying to have a div toggle between
hidden and shown using the slideToggle function. This is my code that
I have in the head of my html:
$(document).ready(function(){
$('a#link').click(
$('div#bugDiv').slideToggle('
> $(document).ready(function(){
> $('a#link').click(
> $('div#bugDiv').slideToggle('slow')
> );
>
> });
>
> Right now, the way it works, the bugdiv slides to hidden on load, as
> though it's just executing the code as opposed to associating it as
> the oncli
5 matches
Mail list logo