Code Snippets

How to change the style of the title attribute

How to change the style of the title attribute

How to change the style of the title attribute You can change the title attribute design using CSS. In this code snippet, we will use an anchor tag. //HTML Site Link //CSS a { position: relative; display: inline-block; margin-top: 20px; } a[title]:hover::after { content: attr(title); position: absolute; top: -100%; left: 0; } how to change […]

Hide and show element using plain javascript

Hide and show element using plain javascript

Hide and show element using plain javascript Please check the below code snippet:- //HTML Click Me This is my DIV element. // JS function ToggleElement() { var x = document.getElementById(“myDIV”); if (x.style.display === “none”) { x.style.display = “block”; } else { x.style.display = “none”; } } hide element via javascript,hide and show elements in javascript,hide […]

php check if time is less than the current time

php check if time is less than the current time

php check if time is less than the current time $date_now = new DateTime(); $date2 = new DateTime(“01/02/2016”); if ($date_now < $date2) { echo 'less than'; }else{ echo 'greater than'; } PHP check if time is greater than the current time $date_now = new DateTime(); $date2 = new DateTime("01/02/2016"); if ($date_now > $date2) { echo […]

Scroll to Top