jquery - render data by handlerbars helper function making sidebar open very slowly -


i facing strange issue. have array of objects rendering through handlebars. each object renders comment list , comment icon.

the list of objects being rendered perfectly, after rendering large number of objects (around 500), when click on comment icon sidebar taking 4-5 seconds of time open.

my click event looks this:

$maincontainer.on("click",'.activities-icon-list .cms-action', function() {             var actiontype = $(this).data("act-type");             var $acitivityitem = $(this).parents(".activity-item.cms");              var contentid = $acitivityitem.data("cid");             var contenttype = $acitivityitem.data("ctype");             var iscmsliked = number($acitivityitem.data("cms-liked"));             var requestactiontype = iscmsliked > 0 ? "unlike": "like";              if(actiontype == "like") {                 // code             }             else if(actiontype == "comment") {                 $(".opnlikers")                     .siblings(".sidebartab")                     .removeclass("activetab")                 .end()                 .addclass("activetab");                   $(this).parents(".activity-item").addclass('active');                 $('.ui.sidebar')                     .sidebar({                         dimpage: true,                         scrolllock: true,                         closable: false                     })                     .sidebar('show')                     .find(".opnlikers")                     .css("display","block");                  $maincontainer.addclass("overflow-hidden");                 loadcmslikesandcomments(contentid);                 owl.trigger('owl.goto', [0, 1500]);             }             else if(actiontype == "fevorite") {                 // code             }             else if(actiontype == "share") {                 // code             }         }); 

any highly appreciated.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -