www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] Running multiple functions sequentially

  1. #1
    Join Date
    Mar 2004
    Location
    Nevada, USA
    Posts
    185

    resolved [RESOLVED] Running multiple functions sequentially

    I have read a lot of articles on running multiple functions sequentially, but none of them work for me.

    I have the following code but only the first function runs. Can anyone tell me the correct syntax to get this code to work?

    I have tried a lot of variations but nothing I have done will allow the functions beyond the first to run.

    Note: I know just enough about writing javascript to be dangerous.

    Code:
    <script type="text/javascript">
    $(document).ready
    (function(){$('#column-left').fadeIn(4000);})
    (function(){$('#column-middle').fadeIn(4000);})
    (function(){$('#column-middle').fadeIn(4000);})
    </script>
    Lawrence
    Larry

  2. #2
    Join Date
    Mar 2004
    Location
    Nevada, USA
    Posts
    185
    I was able to get the code to do what I wanted it to do, but the code is not very elegant. I am sure there is a better way do write this code. I would like to see how it should be written.

    Code:
    <script type="text/javascript">
    $(document).ready
    (function one()   {$('#column-left').fadeIn(2000);})
    
    $(document).ready
    (function two()   {$('#column-middle').fadeIn(4000);})
    
    $(document).ready
    (function three() {$('#column-right').fadeIn(6000);})
    </script>
    Larry

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles