skip to Main Content

Collapsiable menu close all except target, when it open in jQuery

This is the HTML structure of my sidebar menu. Submenu is a collapsible menu. <ul class="block-navigation" id="sidebar-navigation"> <li class="navigation-item has-child navigation-submenu"> <a class="open-submenu" href="#"> School Affairs <em></em> </a> <ul class="block-navigation-submenu"> <li class="navigation-item"> <a class="" href="#"> <span>School Affairs</span> </a> </li> <li…

VIEW QUESTION

JQuery .append(): Add <strong> inside <p>

I'm trying to render this dynamically using jQuery .append() : <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" style="color: white" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> <p> <strong>Error!</strong> My error message </p> </div> But I can't seem to get the p…

VIEW QUESTION

jQuery().html() containing script tag with type="module" including external js file

When I try to set div content with jQuery("#some-div").html("<app-bysquare>Bla bla bla</app-bysquare><script>alert("OK");</script>");, then the alert(); is fired up just fine. If I try to include external js file that contains just alert(); like this jQuery("#some-div").html("<app-bysquare>Bla bla bla</app-bysquare><script type="text/javascript" src="alert.js"></script>");, then it…

VIEW QUESTION
Back To Top
Search