To make it work you will need to create a database in phpMyAdmin.
JavaScript
AJAX request – JSON local file
Request single JSON data
Request array JSON data
AJAX request – TXT file
With Ajax You can receive data asynchronously without page reload.
Method 1 – onload function
Method 2 – readystate function
Write text from TXT file in a specific div with AJAX
jQuery – Add class / remove class
Disable right click with JavaScript
If You want to protect your website content by prevent right click there is a single line of JavaScript code to do it:
Add “sticky” class to header when scrolling window
JavaScript toggle add class / remove class
If You have multiple elements and do You want to set an active class only the clicked item. You can control with this snippet for instance a size selector on a webshop’s product page.
If You have only one element and do You want to control a menu dropdown toggle:
Method 1
Method 2
HTML
Method 3
JavaScript toggle to add “active” class
HTML
JavaScript
iPad layout scales up when rotating from portrait to landscape
Orientation change on Apple devices causes a zoom in effect in the browser.
This snippet will solve this problem: