[SCRIPT]-CALLING JQUERY INSIDE RESULTS DIV

CALLING JQUERY INSIDE RESULTS DIV

function bindEvent() {
   $( "#home" ).off('click').on('click', function() {     
   $.post("processor.php",
       {
           home: "home"
       },
       function( data ) {
                 bindEvent();
           }
      );
  });
}
bindEvent();

You have to eval your response scripts:

$( "#home" ).click(function() {     
    $.post("processor.php",
           {
               home: "home"
           },
           function( data ) {
               $( "#main" ).html( data );
               $( "#main" ).find("script").each(function(i) {
                   eval($(this).text());
               });
           }
    );
});
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments