Palindrome Checker
How do I make an palindrome checker?
Just a bit of jQuery practice.Taken from http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/. What is a palindrome checker? How do you make a palindrome checker? This script and codes were developed by Ajay Karwal on 26 December 2022, Monday.
Palindrome Checker - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Palindrome Checker</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Palindrome Tester</h1>
<p>Enter a word to see if it reads the same backwards as it does forwards</p>
<form class="form-inline" role="form"> <input id="wordInput" type="text" class="form-control" placeholder="Go on, enter a word"> <input id="checkWordButton" type="submit" value="Go" class="btn btn-primary">
</form>
<p id="result"></p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Palindrome Checker - Script Codes CSS Codes
body {margin:20px}
#result { margin-top:20px; padding:10px; font-size:1.5em; }
Palindrome Checker - Script Codes JS Codes
var result = $("#result");
$("#checkWordButton").click(function(e) { e.preventDefault(); var wordForward = $("#wordInput").val().toLowerCase(); if (wordForward.length > 0) { checkWord(wordForward); } else { result.text("I said enter a word! Pay attention").addClass("bg-info"); }
});
function checkWord(word) { //alert(word); var word2 = word.split('').reverse().join(''); if (word == word2) { result.text("Well done, '"+ word +"' is a Palindrome. You win.").removeClass().addClass("bg-success"); } else { result.text("Nope. '"+ word +"' is not a Palindrome. Try again.").removeClass().addClass("bg-warning"); }
};
Developer | Ajay Karwal |
Username | ajaykarwal |
Uploaded | December 26, 2022 |
Rating | 3 |
Size | 2,246 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Change Case | 2,299 Kb |
Custom animated checkboxes | 2,818 Kb |
Skill Bars - React Component | 4,637 Kb |
CSS Grid - Grid Template Areas | 2,314 Kb |
Template 1 | 1,987 Kb |
ToDo List - Vanilla JS | 3,546 Kb |
Background Color Switcher - ReactJS Component | 4,580 Kb |
React Button variants test | 3,319 Kb |
Find PI to the Nth Digit | 1,516 Kb |
CSS Grid Test | 2,377 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSSOff 2013 Submission | Codewunder | 14,766 Kb |
A simple log in form made with css | Mayurelbhar | 2,160 Kb |
Animated bar chart | CreativePunch | 3,124 Kb |
Loader | MikitaLisavets | 3,321 Kb |
Konami Code Easter Egg | Teolitto | 3,051 Kb |
Velocity.js custom stagger | Tommiehansen | 4,805 Kb |
Electric worm | Jeffibacache | 2,377 Kb |
Loading Bar | Jaradlight | 2,333 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
Simple Login Form Template | Banunn | 3,571 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!