Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

How to : use a controler function by another controler

$
0
0
Hi I have a problem with my project. I have a click event in one of my controller that call another controller to displays a content the thing that it works once and after re-clicking on the same element it crash. So my solution will be that after the first call you use the function that display the content. My question is how ? thanks.

      the click event on my first controller that empty  the div then add the new content. It only works once why ?

  1. '#button_0 click' : function(el,ev) {
  2. var classP = "";
  3. var content = "";
  4. classP = el.attr('class').substr(11);
  5. $(".moments_list").html('');
  6. content = $('.personal_page').moments_list({ 
  7. selectedCategoryId : classP,
  8. isNotClicked : [false, true, true, true, true],
  9. isDark : 0, 
  10. areaInit : true,
  11. superInit : false,
  12. triangleInit : false
  13.   }); 

Viewing all articles
Browse latest Browse all 3491

Trending Articles