10,14d9 < var bmode='border'; < var lastc=null; < var thewidth=2; < var thetype='solid'; < var thecolour='red'; 19d13 < if (!lastc) { lastc=document.getElementById('sborder'); } 23d16 < if (!lastc) { lastc=document.getElementById('sborder'); } 27c20 < eval('$("' + oisval + '").css({"color": "' + thecolour + '", "' + bmode + '": "' + thewidth + 'px ' + thetype + ' ' + thecolour + '"})'); --- > eval('$("' + oisval + '").css({"color": "red", "border": "2px solid red"})'); 31c24 < eval('$("body").css({"color": "black", "' + bmode + '": "' + thewidth + 'px ' + thetype + ' black"})'); --- > eval('$("body").css({"color": "black", "border": "2px solid black"})'); 35c28 < eval('$("body").find("' + oisval + '").css({"color": "' + thecolour + '", "' + bmode + '": "' + thewidth + 'px ' + thetype + ' ' + thecolour + '"})'); --- > eval('$("body").find("' + oisval + '").css({"color": "red", "border": "2px solid red"})'); 37d29 < toggle(lastc.innerHTML.toLowerCase()); 40,60d31 < < function titlesuffix() { < document.getElementById('selwidth').title+=' ... ' + thewidth; < document.getElementById('seltype').title+=' ... ' + thetype.toLowerCase(); < document.getElementById('icolour').title+=' ... ' + thecolour; < } < < function toggle(insuffix) { < lastc=document.getElementById('s' + insuffix); < lastc.style.backgroundColor='yellow'; < if (insuffix == 'outline') { < document.getElementById('sborder').style.backgroundColor='white'; < } else { < document.getElementById('soutline').style.backgroundColor='white'; < } < document.getElementById('selwidth').value='-' + thewidth; < document.getElementById('seltype').value='' + thetype.toUpperCase(); < document.getElementById('icolour').value='' + thecolour.toLowerCase().replace('red','#ff0000'); < titlesuffix(); < return insuffix; < } 65,66c36,37 <

Put   Border  Outline Around HTML Element Type or .Class or #ID

<

RJM Programming - May, 2015 and December, 2020

--- >

Put a Border Around HTML Element Type or .Class or #ID

>

RJM Programming - May, 2015