dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: functions like jQuery

  1. #1
    Join Date
    Feb 2010
    Posts
    1

    functions like jQuery

    Hi,
    I have been wondring how i can create functions like jQuery of the style
    $(ID).function()

    where ID is the id of an HTML element and function is a javascript function.

    where the $(ID).function() is called when the html element is painted

  2. #2
    Join Date
    Dec 2009
    Location
    Shropshire UK
    Posts
    153
    What you're looking for is method/function chaining or alternatively cascades. The methods in the chain need to return this.

    Just a quick google for 'javascript chaining'.

    http://css.dzone.com/news/javascript...ing-your-metho

    I'm sure there's many more.

    RPG

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