[jQuery] 1.0a toggle() function

[jQuery] 1.0a toggle() function

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=406150916-11072006><FONT face=Arial color=#0000ff size=2>I see
it now. I was thinking that the toggle was being performed on the
DIV.</FONT></SPAN></DIV>
<DIV><SPAN class=406150916-11072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=406150916-11072006><FONT face=Arial color=#0000ff size=2>I
could have used this just last night actually. Thanks for
clarifying!</FONT></SPAN></DIV>
<P><FONT size=2><!----------------//------<BR>andy matthews<BR>web
developer<BR>certified advanced coldfusion programmer<BR>ICGLink,
Inc.<BR>andy@icglink.com<BR>615.370.1530
x737<BR>--------------//---------></FONT> </P>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Myles
Angell<BR><B>Sent:</B> Tuesday, July 11, 2006 10:47 AM<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> Re: [jQuery] 1.0a toggle()
function<BR><BR></FONT></DIV>On 7/11/06, <B class=gmail_sendername>Andy
Matthews</B> <<A href="mailto:andy@icglink.com">andy@icglink.com</A>>
wrote:
<DIV><SPAN class=gmail_quote></SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff
size=2>Myles...</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>How does the function get
triggered? You don't have an onclick event on the HREF
tag.</FONT></SPAN></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR>Andy,<BR><BR>The
$(document).ready assigned:<BR>       
$('#button').toggle( <BR><BR>Which binds the click event to the targetted dom
object. In this case, it will toggle the function of the click action to be:
<BR><BR>           
function(){    $('div').slideDown('normal') },
<BR>and:<BR>           
function(){    $('div').slideUp('normal')
}<BR><BR>        );<BR><BR>It's odd at first,
but makes more and more sense as you play with it.<BR><BR>Here is the code
working for me: <A
href="http://be.twixt.us/jquery/test_click.php">http://be.twixt.us/jquery/test_click.php</A><BR><BR>Myles<BR></BLOCKQUOTE></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



















































    • Topic Participants

    • andy