What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-12 13:08:14
js scroll page horizontally with mouse wheel
(function() { function scrollHorizontally(e) { e = window.event || e; var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); document.getElementById('yourDiv').scrollLeft -= (delta * 40); // Multiplied by 40 ... Add solution -
Javascript 2021-11-11 05:14:12
jquery ajax form submission
// jQuery ajax form submit example, runs when form is submitted $("#myFormID").submit(function(e) { e.preventDefault(); // prevent actual form submit var form = $(this); var url = form.attr('action'); //get submit url [replace ur... Add solution -
Javascript 2021-11-09 13:12:17
Sending an Ajax request before form submit
$('form').submit(function(e) { // this code prevents form from actually being submitted e.preventDefault(); e.returnValue = false; // some validation code here: if valid, add podkres1 class if ($('input.podkres1').length > ... Add solution -
Html 2021-11-07 06:35:19
javascript get value of input on button click
<form action="/"> <label for="">Whatever you want</label> <input type="text" id='form'> <input type="submit" id="submit"> </form> <script> const btn = doc... Add solution -
Html 2021-11-02 22:01:06
scroll to top smooth safari
<!--Example of a button to scroll to top, Remember to use the same id on both the button and the function --> <button id='myBtn' > Click me to go to top! </button> <!-- When the user clicks on the button, scroll to the top ... Add solution -
Javascript 2021-10-30 08:40:21
input text react 2020
function LoginForm() { const [email, setEmail] = React.useState(""); const [password, setPassword] = React.useState(""); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); api.login(email, password); ... Add solution
Best helpers
Arnav Bose
+5
Thepace
+5
Nick Vaccaro
+5
Matt2507864
+5
Rodrigorgs
+5
Elai Mateo
+5
RoToRa
+5
Newbie
+5
Mostafa 36a2
+5
Amalloy
+5
Auntkym
+5
Rev1.0
+5
Piquet
+5
J. Marks
+5
Jim Mourgos
+5
Jeff Sours
+5
Ohhh
+5
Babak
+5
Naigel
+5
Catimann
+5
A10ciod
+5
Holyeyeolo
+5
TheShade
+5
Waldrumpus
+5