Jquery accessing function -


in function below calling on page load, function called. new jquery , im wondering how call same function inside of function. comments have been inserted indicate need put call same function recreate click triggers.

_loadfolder: function () {     $("#title a").each(         function (intindex) {             $(this).bind(                 "click",                 function () {                      var stop = intindex;                     var temp = '';                     var directory = '';                     var item = '';                     var newlink = '';                     var folders = '';                      $("#title a").each(                         function (intindex) {                             item = $(this).text();                              temp = temp + item;                             folders = folders + "<a id='item'>" + item + "</a>";                             if (intindex == stop) {                                 directory = temp;                                 newlink = folders;                             }                         }                     );                      document.getelementbyid("title").innerhtml = newlink;                      $(".template-download").remove();                     $.ajax({                         url: 'http://127.0.0.1/' + directory,                         datatype: 'json',                         //context: document.body                         context: $('#fileupload')[0]                     }).always(function () {                         $(this).removeclass('fileupload-processing');                     }).done(function (result) {                         $(this).fileupload('option', 'done')                             .call(this, $.event('done'), {                                 result: result                             });                     });                     console.log($that);                     //load same function here apply click triggers due innerhtml removing them                         }             );         }     ); }, 


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -