jquery - Access a dynamically created control through javascript - ASP.NET -


I have a javascript function in my page, through which I create some element in the page as 'JQuery UI droppable' Give it / P>

  function set Draubler target () {$ (.cssDockZone) .droppable (); }  

But with the class CSS dock zone, the element is dynamically created on user interaction. So I'm making the first control behind the code and finally at the end I register a script block which calls the Setropop eligibility.

  // Set droppoint target ClientScript.RegisterClientScriptBlock (this.GetType ()), "SetDroppableTargets", "setDroppableTargets ()", true);  

But the Javascript function is enforced as long as the controls are created, I register the script at the end (after creating the control) and I will name the class By finding the elements, I check it 'CssDockZone' and I get it like 0.

  $ (.cssDockZone). Length  

Any ideas?

  jQuery (function () {var _length = $ (.cssDockZone). Length;} );  

Comments