HOME / BLOG

How to invert color of an image using css?

Invert color of an image using css //use this style in the tergatted image img{ filter: invert(100%); }  

How to get the category of current post in wordpress?

<?php //get the category of current post in wordpress foreach((get_the_category()) as $category) { echo $category->cat_name . ‘ ‘; } ?>  

How to get window height on scroll?

Get window height on scroll $(window).scroll(function(){ var hght = $(window).scrollTop(); console.log(hght); });  

How to get id (any parameter) from url using jquery?

Get id (any parameter) from url using jquery?   jQuery(document).ready(function(){ var query = window.location.search.substring(1); var vars = query.split(“=”); var ID= vars[1]; alert(ID); });  

How to hide scrollbar using css?

//paste this code in your stylesheet ::-webkit-scrollbar { width:0px; background:transparent; opacity:0; } ::-webkit-scrollbar-thumb { width:0px; background:transparent; opacity:0; }  

How to upload an image to database using php

<?php error_reporting(0); //for no error reporting ?> <html> <head> <title>img insert</title> </head> <body> <?php $filename = $_FILES[“image”] [“name”]; $tempname = $_FILES[“image”] [“tmp_name”]; $folder = “img/” . $filename; //giving your folder directory move_uploaded_file($tempname,$folder); //for moving uploaded file to ur own folder ?> <form action=”” method=”post” enctype=”multipart/form-data”> <input type=”file” name=”image” /> <input type=”submit” name=”submit” /> </form> <?php […]