Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
How to get accepted in Fileice (200% Working) 22/2012
Premium Account
FILE HOSTS PREMIUM ACCOUNT
ALL FILE HOST PREMIUM ACCOUNTS
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Better way to get content via jQuery $.get()
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
Pastable version of
An incrementor function that could be better.
<pre class='prettyprint' language='javascript'>//e is the object, and 'op' is a parameter passed that tells us //if we're increasing or decreasing the value. function step_change(e, op) { var changeVal; //If the value contains a period, then it should be a //small change. The value is split so that the script //knows how many decimal places to set the value to //once the value is changed. if ($(e).value.match(/[.]/g)) { var numVal = $(e).value.split("."); if (numVal[1].length > 2) changeVal = 0.001; else changeVal = 0.05; } else if (parseFloat($(e).value / 10) <= 100) changeVal = 5; else if (parseFloat($(e).value / 10) >= 1000) changeVal = 500; else if (parseFloat($(e).value / 10) <= 1000) changeVal = 50; else changeVal = 5; //altKeyMod is set elsewhere in the app and doubles the //amount if the alt key is held down. if (altKeyMod) changeVal = changeVal * 2; if (op == "+") $(e).value = parseFloat($(e).value) + changeVal; else $(e).value = parseFloat($(e).value) - changeVal; if(numVal) $(e).value = parseFloat($(e).value).toFixed(numVal[1].length); }</pre> <a href="http://www.refactormycode.com/codes/903-an-incrementor-function-that-could-be-better" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>