Add and remove a class on click using jQuery

  <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js”></script> <script> jQuery(document).ready(function(){ jQuery(‘#btnSubmit’).on(‘click’, function() { jQuery(this).addClass(‘toggle’).removeClass(‘codepen’);    }); }); </script> According To Question: #jQuery add remove class onclick codepen #Add Class jQuery […]

Read More

The best way to detect a mobile device

<html><head><script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js”></script><script>var isMobile = false;if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // some code write for mobile device… isMobile = true; }else{ isMobile = false; }</script></head><body><div> <center><h1 […]

Read More

How can I remove a particular value from an array in JavaScript with Example?

<!DOCTYPE html><html>   <head>    <title>How can I remove a particular value from an array in JavaScript with Example? -PHP Kishan</title>    <script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js” crossorigin=”anonymous”></script>    <script>       jQuery(document).ready(function(){   […]

Read More

How to redirect another webpage using JavaScript?

<!DOCTYPE html><html>    <head>    <title>How to redirect another webpage using JavaScript? -PHP Kishan</title>    <script>            function new_Location(newurl) {                    /* The wwindow.location […]

Read More