Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Button on header doesn't work after partial refresh

jme37
Tera Contributor

i have a button on my SN header that opens and closes a side panel. It works fine on most pages but not on the search result page after a search. i think this is due to lazy loading. It can't find the document element in this code and the style 

$scope.openNav = function openNav() {  
        c.data.panel = true;
  document.getElementById("mySidepanel").style.width = "345px";
 
jme37_0-1719329635851.png

 

How can i ensure the header is properly loaded so that mySidepanel is defined ?
 
1 REPLY 1

jme37
Tera Contributor

i think what i need to do is reload/refresh one element on the header rather than reload the whole page - is it possible to do that ?