Use the following command to initialize the repository
> git init
Use the following command to index repository
> git add .
Use the following command to initialize the repository
> git init
Use the following command to index repository
> git add .
#overlay{ | |
position:fixed; | |
z-index:99999; | |
top:0; | |
left:0; | |
bottom:0; | |
right:0; | |
background:rgba(255,255,255,1); | |
transition: 1s 0.4s; | |
} |
``` | |
$(window).scroll(function(){ | |
if($(window).scrollTop() + $(window).height() > $(document).height() - <?php echo( s3_option('s3cc_fixed_trigger') == '' ? 100 : s3_option('s3cc_fixed_trigger') );?>) { | |
$('.s3cc-fixed').css('position','static'); | |
}else{ | |
$('.s3cc-fixed').css('position','fixed'); | |
} | |
}); | |
``` |
If you have a Facebook page for your website or blog, you might want to display how many fans you have. This snippet will help you to get your Facebook fan count, in full text. Don’t forget to add your page ID on line 2. |
If your website is multilingual, it can be useful to detect the browser language to use this language as the default. The code below will return the language used by the client’s browser.
Downloading an image on a remote server and saving it on your own server is useful when building websites, and it’s also very easy to do. The two lines of code below will do it for you. |
Data URI’s can be useful for embedding images into HTML/CSS/JS to save on HTTP requests. The following function will create a Data URI based on $file for easier embedding. |
In wordpress, if you want to auto convert all URLs in your string into clickable hyperlinks, you can actually do it using the built-in function make_clickable(). If you need to do that outside of wordpress, you can refer to the function’s source code at wp-includes/formatting.php |
Using the DOM, you can easily grab all links from any webpage. |