you don't animate an el, you animate a jQuery object! drop the [1]!

On 1/24/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi, all…
>
> I'm trying to run some of the jQuery.easing code, but having a problem…
>
> When I run the code below I get this error message:
>
> "An error has occurred in the script on this page."
>
> Line: 50
>
> Char: 1
>
> Error: Object expected
>
> Code: 0
>
> URL:
> file:///G:/Website%20Trials/Disappearing%20Div_01.html
>
> Ideas anyone?
>
> Thanks!
>
>
>
> Here's the code between the head tags:
>
> <script src="jquery-latest.js"
> type="text/javascript"></script>
>
> <script src="jquery.easing.1.1.js"
> type="text/javascript"></script>
>
> <script type="text/javascript">
>
> $(document).ready(function() {
>
>         $("#examples a").toggle(function(){
>
>                         var el = $('#' + this.href.split('#')[1]);
>
>                         var method = el[0].id;
>
>                         el.animate({width:600}, {duration: 1000, easing:
> method});
>
>         },function(){
>
>                         var el = $('#' + this.href.split('#')[1]);
>
>                         var method = el[0].id;
>
>                         el.animate({width:400}, {duration: 1000, easing:
> method});
>
>         });
>
> });
>
> </script>
>
>
>
> Here's the code between the body tags:
>
>
>
> <div id="examples">
>
> <p><a href="#easeout">toggle</a></p>
>
> <p id="easeout" class="big">easeout</p>
>
> </div>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to