www.webdeveloper.com
Results 1 to 3 of 3

Thread: Jquery syntax

  1. #1
    Join Date
    Nov 2004
    Location
    xxxyyy
    Posts
    357

    Jquery syntax

    I have a html . the onload function calls a javascript function. I want to run a Jquery after the Javascript function calls . How ? whats the syntax ?


    html
    -----
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="onLoadSettings()">

    </body>


    javascript calls
    ---------------

    function onLoadSettings() {

    calculateGrandTotal(); //defined somewhere
    calculatePrevYearGrandTotal(); //defined somewhere
    calculateAcceptTotal();//defined somewhere


    // L1


    }



    JQuery

    I have written a Jquery function

    <script type="text/javascript">
    $(document).ready(function(){
    // some JQuery code here
    });

    </script>


    I want to run this JQuery piece of code in the L1 place . What syntax I should use ?
    Last edited by cofactor; 06-17-2010 at 06:28 AM.

  2. #2
    Join Date
    Dec 2005
    Posts
    2,984
    As long as you have loaded the jQuery library - you can 'mix' syntaxes - standard Javascript and jQuery. Keep in mind, it's all actually all a single syntax - Javascript syntax. It's just that jQuery is a library that uses different functions and objects to make it 'look' different. It's still all valid Javascript syntax.

    In other words, just copy and paste the $(document).ready code.
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  3. #3
    Join Date
    Nov 2004
    Location
    xxxyyy
    Posts
    357
    Quote Originally Posted by aj_nsc View Post

    In other words, just copy and paste the $(document).ready code.
    bravo ...I got my answer here . That works fine.

    Thank you very much.

Thread Information

Users Browsing this Thread

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

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