Login Password

snippets

Last 10 category snippets

0
favorites
0
comments
Avatar Image

Jquery Accordion

Jquery accordion. Easy customization with CSS. ...
posted by suraj-air 1 year ago
0
favorites
0
comments
Avatar Image

jQuery Tabs

A simple jquery tab. You can style it as you want with CSS. :) ...
posted by suraj-air 1 year ago
0
favorites
0
comments
Avatar Image

element exists?

A function to check if an element exists. (Hope i'll never forget) ...
posted by Christian Bachhelm 2 years, 4 months ago
0
favorites
1
comment
Avatar Image

Get cursor position of clicked mouse on a HTML5 Canvas

Javascript function to get mouse position on a HTML5 canvas element. ...
posted by Sayan Chakrabarti 2 years, 9 months ago
0
favorites
1
comment
Avatar Image

String.format() in JS a la Python

String.format() in JS a la Python Usage: var myString="My name is {0} and I am {1} years old" formattedString=myString.format(['sayan',27]) ...
posted by Sayan Chakrabarti 2 years, 9 months ago
0
favorites
2
comments
Avatar Image

Input Mask

A jQuery script allowing you to make default value of an input disappear when focused on that input and reappear only if the user focus out of the input and the input is empty. ...
posted by Mustapha Ben Chaaben 2 years, 10 months ago
0
favorites
2
comments
Avatar Image

Disappearing search field text (jQuery)

Hide when clicked in the search field, the value.(example can be found below in the comment fields) ...
posted by Daniel Schwarz 3 years, 1 month ago
0
favorites
2
comments
Avatar Image

JScript :: + operator

The arithmetic operator + is used to add values together. When operands are strings, which means a string concatenation happens. When the plus operator is used with a number and a string, the number gets converted to a string and then string concatenation is performed. ...
posted by DEEPAK PATIL 3 years, 2 months ago
64
favorites
3
comments
Avatar Image

Submit a form by hitting the enter button inside an input field with jQuery

Users a used to submit a form without clicking the submit button of a form. They expect to get to the next step or page just by hitting the enter button. The code snippets binds the keypress action to all form with the specific CSS-class "enter-submit". In order to bind the action also for ajax-loaded elements we use the binding function "live". ...
posted by Bjoern Gottowik 3 years, 2 months ago
bettercodes.org is released as free software without warranties under GNU Affero GPL v3