Results 1 to 6 of 6

Thread: Give information regarding jQuery CSS, AJAX and Call back Functions

  1. #1
    Join Date
    Nov 2009
    Posts
    62

    Give information regarding jQuery CSS, AJAX and Call back Functions

    I am learning jQuery concept as it is required for our project which we are making on JavaScript. The website project that I am working on is going to be scripted using JavaScript and I have never learnt anything related to jQuery. I need information regarding the following concepts of jQuerry: CSS functions, AJAX functions and Call back functions.

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    jQuery Call back Functions

    To put it into simple words, only when the Java Script animations is fully completed, the Callback function of jQuery is executed.
    Following is the syntax for jQuery Callback functions:
    Code:
    $(selector).hide(speed,callback)
    In the above syntax the parameter callback defines a function. The hide function is first completed before this callback parameter function can be executed.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    CSS functions of jQuery

    JQuery defines a Javascript library. It has been very useful for simplifying programming in Javascript. One of the powerful feature of JQuery is the CSS manipulation. For CSS manipulation, JQuery supports three functions:
    • css(name)
    • css(name,value)
    • css({properties})

    All the manipulation for CSS in JQuery are performed with the help of the above mentioned three functions.

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    CSS manipulation in Jquery

    To initialize a value to the properties of CSS you may make use of the $(selector).css({properties}) function of Jquery CSS manipulation. This is done for all the matching elements. Here is an example to demonstrate the $(selector).css({properties}) function of Jquery CSS manipulation:
    Code:
    <html>
    
    <head>
    <script type="text/javascript" src="Jqry.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
      $("button").click(function(){
      $("p").css({"background-color":"White","font-size":"100%"})
      })
    })
    </script>
    </head>
    
    <body bgcolor= "Red">
    <p>Paragraph Line</p>
    <h1>Heading</h1>
    <p>Second Para.</p>
    <button type="button">Change</button>
    </body>
    </html>

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    AJAX Functions of J-Query

    Asynchronous JavaScript and XML is the full form for AJAX. Its main purpose to simplify the web applications and also to make the more user friendly. To enhance the web development with AJAX technique a rich set of methods is available in J-Query. Here are a few AJAX Requests in J-Query:
    • post(url,data,callback,type)- Making use of the HTTP POST to load remote data.
    • ajax(options)- To load data in the object of XMLHttpRequest

  6. #6
    Join Date
    May 2008
    Posts
    2,389

    jQuery CSS- Size Manipulation

    For Size Manipulation in jQuery there are two finctions available:
    • $(selector).width(value)
    • $(selector).height(value)

    Code:
    <html>
    <head>
    <script type="text/javascript" src="temp.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
      $("button").click(function(){
      $("#D1").height("500px")
      })
    })
    </script>
    </head>
    
    <body>
    <div id="D1" style="background:Gren;height:200px;width:150px">
    jQuery</div>
    <div id="D2" style="background:Green;height:200px;width:150px">
    CSS</div>
    <button type="button">Enter</button>
    </body>
    
    </html>
    To set the width of elements that are matching the function width(value) is used and to set the height of elements that are matching the function height(value) is used.

Similar Threads

  1. Post Multiple Data with Ajax(Jquery)
    By Tyee in forum Software Development
    Replies: 4
    Last Post: 17-06-2011, 10:22 PM
  2. jQuery AJAX vs. Adobe AIR AJAX Class
    By Agaev in forum Windows Software
    Replies: 5
    Last Post: 06-07-2010, 01:59 PM
  3. Can I Define and Call my Own Functions in JavaScript?
    By Rob Dizzle in forum Software Development
    Replies: 5
    Last Post: 09-02-2010, 05:18 AM
  4. How to call a C functions within PHP?
    By Rixwel in forum Software Development
    Replies: 3
    Last Post: 05-09-2009, 09:12 AM
  5. Trouble with jQuery, Ajax, Jsp
    By Kirt in forum Software Development
    Replies: 3
    Last Post: 24-04-2009, 11:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,716,508,514.85884 seconds with 17 queries