Solved

redoing a bind

Posted on 2014-04-20
1
174 Views
Last Modified: 2014-04-20
I'm trying to make my own treeview app which will pull data from an ajax request (however currently just copying the html in).

My problem that the event binded at the beginning is not copied to the newly created elements. I cannot figure a way of copying or redoing the bind event to the newly created code.

My code is http://jsfiddle.net/yF72u/ which as you can see works on the first branch, but once expanded does not expand on the newly created branches.

Has anyone got any suggestions on how I can redo the bindings?

Thank you
0
Comment
Question by:tonelm54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
tonelm54 earned 0 total points
ID: 40011532
Actually found the answer:-
            $('li').off('click');
            $('li').click(function (event) {
                liClick(this);
            });

Open in new window

http://jsfiddle.net/k7jxn/3/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question