Related Content
Creating A Mouse "Looking" Script With JavaScript
I've seen lots of "our team" pages over the years, but one of the ones that stood out to me the most were those that had an interactive element to them. For me, it adds a bit of personality to the page and makes it feel more alive than a bunch of silhouettes of the directors.
Creating Tic Tac Toe In JavaScript Part 2: Adding A Computer Player
After creating tic tac toe in JavaScript in my previous article I decided to add a second player in the form of a computer opponent.
Creating Tic Tac Toe In JavaScript Part 1: The Game
Tic Tac Toe (or noughts and crosses) is a good game to create when learning game development as it has simple rules and a known win state.
Creating A Simple Pie Chart With CSS
A pie chart is a great way of showing the relationship between numbers, especially when showing percentages. Drawing a pie chart from scratch takes a fair amount of maths to get working and so people usually go for third party charting libraries in order to add charts to the page.
Getting Up And Running With Nightwatch.js
Nightwatch.js is an end to end testing framework, written in JavaScript. It can be used to test websites and applications and uses the W3C WebDriver API to drive modern browsers to perform the tests.
In this article I will look at setting up Nightwatch.js in a project and getting started with writing tests.
Seven Tips For Getting The Most Out Of Marp
The Marp suite of tools is great for creating presentations from simple Markdown rules.
Comments
You are going to stop people also from pressing Enter on "Submit"?
Change:
to:
Submitted by Azizur Rahman on Mon, 07/18/2011 - 11:30
Permalinkthanks for the code , it help me alot, thanks again
Submitted by Israel R on Fri, 01/06/2012 - 20:24
PermalinkI can submit this form bt pressing teh Enter key when in a text input field (i.e if I use the Enter key instead of the tab key to move from one field to the next. I tried to prevent this on my site using teh Jquery on this page but it did not work for me either. Is there a better way ?
Chhers
Richard
Submitted by Anonymous on Wed, 02/22/2012 - 21:29
PermalinkSubmitted by Django developer on Fri, 11/03/2017 - 10:09
PermalinkAwesome :)
Submitted by Paritosh Singh on Fri, 09/27/2019 - 19:40
PermalinkThanks
Submitted by Anonymous on Wed, 11/10/2021 - 08:11
PermalinkI made a font-size slider that works great. It indicates the size with a txt. You can click the text and it will change into an input field so you can omit the slider and directly input the font-size. On blur it will set the slider & fontsize. The last step was to implement key action (enter) to blur the field and set the values. But the page where I am using it (a wordpress code-snippet plugin page) binds the enter action to 'save' the code-snippet. So now my code works, upon enter key it sets the size you input in the field, but it also saves the snippet. So I took your example, and tried adding e.preventDefault(), but it still also saves the snippet, I guess that save action isn't default. Can you tell me how I can unbind that save action?
Working jsfiddle: http://jsfiddle.net/junkfood66/e3y0jn2z/50/
Submitted by Pampus™ on Fri, 12/02/2022 - 15:12
PermalinkHi Pampus™, Thanks for reading and commenting!
I think this article might help you: https://www.hashbangcode.com/article/inspecting-and-reusing-jquery-even…
It sounds like you need to rebind an event that's already been added to the page. That code should help you do just that.
Submitted by giHlZp8M8D on Fri, 12/02/2022 - 15:34
PermalinkAdd new comment