Seth is currently live on Twitch! Go There Now?
1560521628710873072
Programming
This is my nerdy side.
This is my thought process.

There are many questions that I have as I develop my websites and web applications. This page is a collection of solutions that I have found to the questions I needed answers for. Some are quick and easy, others require more explanation.

  • What's The Ucwords() Equivalent In Javascript? Capitalize Each Word In A String

    I am wondering why Javascript doesn't have more functions like PHP has. I use the ucwords(); function with PHP when I have to, it capitalizes each word of the string. There is no real equivalent to that in Javascript though, so we have to do a workaround. I suppose there's a lot of ways to do this, ...

    5 days ago Read More
  • How To Delay Image Loading Until It's In View

    So I had another idea with the image loading. This time, I wanted to make it so images don't load unless they are in view. This should help out page times a little bit and make a nice little fade in effect whenever you see new images. This also allows me to animate them in interesting ways on load. ...

    1 week ago Read More
  • How To Change The Color Of Ordered List Items

    Today I came across the idea of reshaping my code div inside these posts. I wanted it to be a dark theme, because I rather prefer dark theme while writing in code. So I made the background dark, color of the font white, even added a separate color for any comments that I'll put after lines to explai...

    1 week ago Read More
  • Using jQuery & The CSS Transition Property To Create Interesting Transitions

    I had the idea today of making the top of the website, the header images, transition more fluidly. I don't like how they fade in so abruptly, even though that's a good solution for them to just pop in. I used to use jQuery's $().animate({ }); to animate things like opacity and whatnot. In order to a...

    1 week ago Read More
  • Text Area With 100% Width With Borders And Padding

    This was something that I just recently figured out. For years my CSS was this: <textarea></textarea> <style> textarea{ border: 1px solid #000; padding: 5px; /* border-left (1) + border-right (1) + padding-left (5) + padding-right (5) = 12 */ width: calc(100% - 12px); } </...

    1 week ago Read More
  • How To Auto-Grow A Text Area

    Today I was messing around with my admin side of things and I discovered that my textareas were not behaving the way I wanted them to. I want them to grow when you type into them. I had this complicated code written out to accomplish this, but I thought, "there's gotta be a better way." So here's my...

    1 week ago Read More
  • How Do You Display HTML Tags?

    To display HTML tags in a website, use their HTML encoding translation. Replace the < character with &lt; Replace the > character with &gt; Replace the & character with &amp; You don't actually have to encode the ">" character. That one will show as long as you encode th...

    2 weeks ago Read More
  • Where does the list-style property actually matter?

    By editing the list-style property of the Li the element, you will be able to change the list-style property. It seems that the default list-style property in an LI is "inherit", but if you change it at the top of your CSS style sheet then it will be stuck as that everywhere. So editing it on your U...

    2 weeks ago Read More
  • Using jQuery To See If An Element Exists

    To see if an element exists, the easiest way is to count how many elements of that type are on the page. Use the .length property of the jQuery collection returned by your selector: <div></div> <script> if($('div').length){ //-> if div has a length, ie: has more than zero instances...

    2 weeks ago Read More