jQuery and objects - right way

Discussion in 'Javascript' started by Czterysta Czwarty, Feb 11, 2011.

  1. Hi!

    Can you explain me how to build code with jQuery and objects?

    Now I have:
    in $(document).ready()
    - functions for events: var chooseElement = function(){...}
    - binding this function to events : $
    ('#element').click(chooseElement);
    and jQuery plugins used in ready: jQuery.fn.hideEmptyCategories =
    function(){...}

    I need some tips how to write it in right way. Move functions to
    object and binding it to event and plugins?
    Can you help me?
    Czterysta Czwarty, Feb 11, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. 7stud
    Replies:
    11
    Views:
    670
    Dennis Lee Bieber
    Mar 20, 2007
  2. Oran
    Replies:
    2
    Views:
    513
  3. Aaron Gray
    Replies:
    20
    Views:
    379
    Lasse Reichstein Nielsen
    Jul 27, 2008
  4. lorlarz
    Replies:
    6
    Views:
    208
    David Mark
    Mar 25, 2010
  5. Replies:
    8
    Views:
    291
    Jorgen Grahn
    May 16, 2013
Loading...

Share This Page