Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. jquery live method doubt

jquery live method doubt

Scheduled Pinned Locked Moved C#
questionjavascripthelp
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    firefeet
    wrote on last edited by
    #1

    hi all, $("div.newdiv").bind("click", newdivclick); i know this will bind the click event of all div having cssclass 'newdiv' to the function 'newdivclick'. My doubt is can i do a similar thing with .live method? $("div.newdiv").live("click", newdivclick); this din work for me. i want to bind all divs with a specific class to a function on click or any other event. and i will be creating dynamic divs too which should also be binded to that function. thats y looking for live method.How can i do it. can anyone help me.

    F C D 3 Replies Last reply
    0
    • F firefeet

      hi all, $("div.newdiv").bind("click", newdivclick); i know this will bind the click event of all div having cssclass 'newdiv' to the function 'newdivclick'. My doubt is can i do a similar thing with .live method? $("div.newdiv").live("click", newdivclick); this din work for me. i want to bind all divs with a specific class to a function on click or any other event. and i will be creating dynamic divs too which should also be binded to that function. thats y looking for live method.How can i do it. can anyone help me.

      F Offline
      F Offline
      firefeet
      wrote on last edited by
      #2

      i found out the mistake..... live method is included only in jquery-1.3.2..... $("div.newdiv").live("click", newdivclick); this works......

      1 Reply Last reply
      0
      • F firefeet

        hi all, $("div.newdiv").bind("click", newdivclick); i know this will bind the click event of all div having cssclass 'newdiv' to the function 'newdivclick'. My doubt is can i do a similar thing with .live method? $("div.newdiv").live("click", newdivclick); this din work for me. i want to bind all divs with a specific class to a function on click or any other event. and i will be creating dynamic divs too which should also be binded to that function. thats y looking for live method.How can i do it. can anyone help me.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Trying DESPERATELY to believe this has something to do with C#.....

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        P 1 Reply Last reply
        0
        • C Christian Graus

          Trying DESPERATELY to believe this has something to do with C#.....

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          No matter how hard you close your eyes and wish upon a star, javascript has nothing whatsoever to do with C#.

          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

          My blog | My articles | MoXAML PowerToys | Onyx

          C 1 Reply Last reply
          0
          • P Pete OHanlon

            No matter how hard you close your eyes and wish upon a star, javascript has nothing whatsoever to do with C#.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            *sigh* I know. C# questions in the ASP.NET forum I can kind of get, some people have no idea what ASP.NET is, and think it's just .NET. But, javascript in the C# forum ?

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            P 1 Reply Last reply
            0
            • C Christian Graus

              *sigh* I know. C# questions in the ASP.NET forum I can kind of get, some people have no idea what ASP.NET is, and think it's just .NET. But, javascript in the C# forum ?

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              Christian Graus wrote:

              But, javascript in the C# forum ?

              Well, they've both got braces. :rolleyes:

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              1 Reply Last reply
              0
              • F firefeet

                hi all, $("div.newdiv").bind("click", newdivclick); i know this will bind the click event of all div having cssclass 'newdiv' to the function 'newdivclick'. My doubt is can i do a similar thing with .live method? $("div.newdiv").live("click", newdivclick); this din work for me. i want to bind all divs with a specific class to a function on click or any other event. and i will be creating dynamic divs too which should also be binded to that function. thats y looking for live method.How can i do it. can anyone help me.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                :confused: ...and this has what to do with C# and the .NET Framework???

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008
                But no longer in 2009...

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups