jQuery(document).ready(function ($) { var dashboardItem = '.menu_main li.menu-dashboard a' var newDashboardItem = '<span class="icon-main-dashboard"></span>Test Text Here' function changeHtml() { for (el of newHtml) { $(el.selector).html(el.changedTo); } } var newHtml = [ { selector: dashboardItem, changedTo: newDashboardItem, }, ]; changeHtml(); }); //end ready function
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter