Get Latest Tricks Alert Daily
Follow Readers

Make a JSFiddle in CSS


Has anyone ever asked you for help troubleshooting some combination of HTML, CSS, and JavaScript, and they copy and paste the entirety of all the files into an email or forum post? It's super common, and so consider this an intervention. When you are having trouble figuring something out:
  1. Go to JSFiddle.
  2. Put the HTML in the HTML area, the CSS in the CSS area, and the JavaScript in the JavaScript area
  3. Press Run and see if the result is demonstrating the problem, adjust as needed to make the problem very clear.
  4. Press Save to get a public URL.
  5. Share that URL where you are trying to get the troubleshooting help.
Also, if you can whittle it down to the bare minimum still showing the problem, that's ideal.
The key is being able to see the result. It's 100 times easier for your potential troubleshooter to play with that than trying to guess what is happening by looking at your code alone.
A lot of times, during the process of creating this (let's call it what it is: a reduced test case) you'll solve the problem yourself. And if not, the chances of you getting help from someone else goes way up.
It doesn't have to be JSFiddle either, could be JS BinCSSDesk, a temporary test page you toss up on your own site, whatever.
Doing this will make you a better coder and better in bed. I promise.


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to our regular Email Updates!

Subscribe To Get Latest Tricks On Email!


1 comment:

  1. very informative articular, Thanks for sharing this