title: click event working only for the first time jquery
body: <p>Below code work for the first time after refreshing the page. But when I try to click again it doesn't work. </p>
  
  <p>After clicking on the element it goes to the next page (detail page) and when it come back, the click event doesn't work. </p>
  
  <pre><code>getNewsCategoryloop: function(dataMap){
      var _this = this;
      var text;
  
      text  = "&lt;div id=\"repeat_get_list_of_category\"&gt;";
      for(key in dataMap) {
          text += '&lt;div class="gallery_wrap col-2"&gt;\
                      &lt;div class="gallery_view full_image" id="cat'+key+'"&gt;\
                          &lt;img src="assets/img/news/athletics_img.jpg" alt="athletics"&gt;\
                          &lt;span class="gallery_title"&gt;'+ (dataMap[key].field_saf == null ? 'no title' : dataMap[key].field_saf) +'&lt;/span&gt;\
                      &lt;/div&gt;\
                  &lt;/div&gt;';
                  $(document).on('click', "#cat"+key, function(){
                      _this.getNewsbyCategoryName("#cat"+key);
                  })
      }
   text+= "&lt;/div&gt;";
   $("#getListOfNewsCategorylist").html(text);            
  },  
  </code></pre>