Rounded Corners in CSS

This below content gives you an idea how to make cross-browser compatible rounded corners with CSS. Example of Rounded Corners: <!DOCTYPE html> <html> <head> <style> .roundCorner{ background: #C2C2C2; border-radius: 25px; border: 3px solid #C2C2C2; padding: 15px; width: 150px; height: 150px; } </style> </head> <body> <div class=”roundCorner”>Rounded corner div!</div> </body> </html>

jQuery search and highlight text

Using jQuery you can search and highlight text within a div from array of elements and wrap a highlight span around each word. Example to search and highlight text: <script type=”text/javascript”> var regex = /(Rubbish|Like|Rough|Raw|Doggie|Billy)/ig; $(‘#divID’).each(function() { var $this = $(this); var text = $this.text(); if (regex.test(text)) { $this.html( $this.html().replace(regex, ‘<span>$1</span>’) ); } }); </script>