- I create a ContentBySearchWebpart, specified my custom Display templates.
- wanted to run some other javascript code, after the Display
Templates have rendered the content -
Registered my custom javascript file in Display template.
$includeScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Slider.js"); - The Problem is that, my Slider.js file code executes before Display
Templates Javascript code.
Can anybody provide me a way to run my Slider.js code after the display templates have rendered the content of ContentBySearchWebpart(CSWP).
I create a ContentBySearchWebpart, specified my custom Display templates. wanted to run some other
Share
🙂 my issue is solved.
I did following :
Registered the custom JS file in Control_YourTemplateName.html
file(like Control_Banner)
$includeScript(this.url, “~sitecollection/_catalogs/masterpage/Display Templates/HWScripts/Banner.js”);
Added these three lines under the first div after body tag, in YourTemplateName.html ( like Banner.html) file.