code convert java script to jQuery
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
var element = $("#tgtP");
var a = element.text();
var b="";
element.click(function(){
for (i = 0; i < a.length; i++)
{
if (a.charCodeAt(i) >= 65 && a.charCodeAt(i) <= 90)
{
b = b + a.charAt(i).toLowerCase();
}
else
{
b = b + a.charAt(i).toUpperCase();
}
alert(b);
}
});
});
</script>
</head>
<body>
<p id="tgtP">aBc dEf ghIK kl</p>
</body>
</html>
Also in JavaScript:
- javascript sum array of objects
- javascript sendredirect
- Math max with array js
- javascript repeat element in array
- javascript array stackoverflow
- random alphabet javascript
- slider js
- how to get output of console.log in a file in javascript
- addclass removeclass jquery
- js page reload
- switch/case with numeric range
- javascript use regex to check for phone number
- vue test form input
- js array delete specific element
- hwo to make ana array of prime numbers in javascript
- render image url in react native
- how to console log array in javascript
- use theme in component mui
- js string does not contain
- how to update json key name while keeping the values in mysql
- json example array
- insert json file in python
- how to animate a flash in jquery
- largest and smallest number in an array 1-100 javascript