If you have a div that sits at the bottom of a slideshow that you want to disappear when the user scrolls down, and then reappears when scrolls back to the top, you can follow the below example. <div> <div class=”a”> A </div> </div> $(window).scroll(function() { if ($(this).scrollTop() > 0) { $(‘.a’).fadeOut(); } else { Full Article…
Search the Wiki
How to create X close button by using CSS
As a pure CSS solution for the close or ‘times’ symbol, you can use the ISO code with the content property. I often use this for :after or :before pseudo selectors. The content code is \00d7. Example div:after{ display: inline-block; content: “\00d7”; /* This will render the ‘X’ */ } You can then style and position Full Article…
jQuery – How check or uncheck all checkbox
In this tutorial, we are going to see how to check or uncheck a group of checkboxes using jQuery. We can use this feature in various scenarios like selecting multiple records to perform database updates or delete. In this tutorial, we have a simple example with less code for obtaining this feature using jQuery. Form Full Article…
Jquery – Get month text from date
You can use jQuery to generate the texts from date, month, or year. Here is an example: let date = new Date(2021, 06, 21); // 2021-06-21 let longMonth = date.toLocaleString(‘en-us’, { month: ‘long’ }); /* June */ let shortMonth = date.toLocaleString(‘en-us’, { month: ‘short’ }); /* Jun */ let narrowMonth = date.toLocaleString(‘en-us’, { month: ‘narrow’ Full Article…
Javascript – How to check and uncheck radio button on click
I was working with a client who was required to be able to uncheck the checked radio. I was struggling for many hours with that request. Finally, I find out a solution to solve that issue with Javascript. The solution is to track the selected state manually using the “click” event handler and a custom Full Article…
Cloudflare – Enable maintenance mode with a static page
About a month ago Cloudflare announced the general availability of Cloudflare Workers, a new feature to complement the existing Cloudflare product offering which allows the execution of JavaScript at the edge of Cloudflare’s CDN prior to the request hitting your own web infrastructure. Cloudflare Workers runs JavaScript in the Google V8 engine developed for Chrome that can Full Article…
HTACCESS – Redirecting a web directory to another directory
Redirecting within the same domain Using htaccess in your root level of your web server, how you redirect one page to another is: RewriteRule ^url-string-to-redirect$ http://www.yourdomain.com/your-new-url-string [R=301,L] Or Redirect 301 /path/to-old-url http://www.cyourdomain.com/path/to-new-url To redirect the contents of a whole directory to another use the below: RewriteRule ^subdirectory/(.*)$ /anotherdirectory/$1 [R=301,NC,L] To redirect the contents of Full Article…
WordPress – How to install and setup multiple sites
A WordPress Multisite network allows you to run and manage multiple WordPress sites or blogs from a single WordPress installation. It enables you to create new sites instantly and manage them using the same username and password. You can even allow other users to signup and create their own blogs on your domain. The WordPress multisite network Full Article…
Facebook app – Making your Facebook app more secure
If security is an afterthought for you while you develop, let’s see how a few big names that have big resources to put into security are doing with protecting their user’s data: Target eBay Zappos Adobe Snapchat And remember how a little bug in OpenSSL made millions of server vulnerable to attack? Even Facebook has had Full Article…
HTML5 video doesn’t work in iOS/Safari/Google Chrome
If you use the HTML5 video element, you may see the issues with the iOS. All the browsers on iOS can’t play the HTML5 video. That issues come from the changes from the iOS that request the server supports byte range transfer. You can fix it by updating the .htaccess if you are using Apache Full Article…