Quantcast
Channel: Javascript, jQuery and other Junk
Browsing latest articles
Browse All 29 View Live

jQuery find/replace text without destroying DOM elements

I found this question on StackOverflow on how to replace text without destroying event handlers, DOM nodes and such. He just wanted to replace a name inside a block of HTML. The name could be inside of...

View Article



The Base Tag

Whenever someone asks me to help troubleshoot a problem with their site, if I can't immediately see the problem or fix it using Firebug, I download the page as an HTML only file. Then you have to deal...

View Article

Image may be NSFW.
Clik here to view.

Equalizer

This script was first written by Stephen Akins to equalize column heights in multiple rows. Chris Coyier of CSS Tricks then posted an update which allowed the heights to adjust while resizing a page. I...

View Article

jQuery Tablesorter, The Missing Docs

The Missing Docs for jQuery Tablesorter 2.0DefaultsMethodsEventsThese docs have been incorporated into myGithub fork of Tablesorter.All DefaultsAppearancecssHeader: "header"The CSS style used to style...

View Article

Image may be NSFW.
Clik here to view.

Adding WordPress Quicktag Buttons to a WP Plugin

Disclaimer: I am a total noob when it comes to WordPress and WordPress plugins.I was wondering how difficult it would be to add a button to the WordPress Post Editor. I've seen a few plugins do it, but...

View Article


Image may be NSFW.
Clik here to view.

AnythingSlider FX Builder

So, to make it easier to figure out how to add FX to AnythingSlider, I put together a bookmarklet (get it from here) that allows you to build/play with the effects live :)If you need instructions, I...

View Article

Image may be NSFW.
Clik here to view.

AnythingSlider Themes

I put together ten more themes for AnythingSlider! YAY!All theme files are meant to be used independently from the plugin's "anythingslider.css" file. So you only need to include one of these theme...

View Article

Print a Paragraph

By default, browsers will print the content of an entire page/web page or selected text. With some simple scripting you can make it easier for your users to get the browser to print the contents of a...

View Article


Adding Swipe Support

I spent some time trying to figure out how to add mobile swipe support without using jQuery Mobile, because the swipe is all I really needed. I don't own an iPhone/iPad/iAnything, so it took a bit of...

View Article


jQuery Rename Attribute (renameAttr)

I woke up this morning with a very unusual urge to make a rename attribute function for jQuery. I know, right.. that's just too weird! So after messing around with it, I decided that it needed to...

View Article

Get All indexOf From A Search String - String.allIndexOf()

This string function is an extension of String.indexOf() and will return all indexes of a search string. It's named allIndexOf. This code extends javascript and does not require jQuery.Originally if...

View Article

Get All indexOf From An Array - Array.allIndexOf()

This array function is an extension of Array.indexOf(), if it exists, and will return all indexes of the search element. It's named allIndexOf(). This code extends javascript and does not require...

View Article

jQuery UI Side Scroller with buttons

Once again, I got up at 2:30am wide awake... that's what happens when I fall asleep at 9:30 LOL. Anyway, I was bored so I searched for something to do. I found a question on CSS Tricks asking how to...

View Article


Image may be NSFW.
Clik here to view.

jQuery Pathslider

I just created this plugin that is a very basic UI Slider (similar to the jQuery slider), but it doesn't just allow you to move the handle horizontally and vertically, it will follow any shaped curve!...

View Article

All Images Loaded (imagesLoaded)

*NOTE* this code causes infinite loops in IE with image load errors, so I improved and turned this into a real plugin and hosted it on github. A little jQuery function that checks if all images are...

View Article


Image may be NSFW.
Clik here to view.

Adding the MovingBoxes plugin to Blogger

These instructions will allow you to add a MovingBoxes widget to any Blogger post. These instruction really apply to any plugin out there, but instead of making a generic post, I think a specific...

View Article

jQuery unwrapInner()

Update: Well, I made a nice post about extending jQuery with an unwrapInner function, but I discovered that the same thing can be done by using jQuery's replaceWith() function... Starting with this...

View Article


CSS-Tricks Organization

If you follow me on Github, you may notice that some of my repositories are now missing... Well, I moved them over to the CSS-Tricks Organization repositories. I thought it would make it easier for...

View Article

Using Google Closure Compiler to write better code

So I ran into a bit of code that I wrote a while back. I thought could be written a lot more efficiently. So I thought, hey Google's Closure Compiler is good at that stuff right? Let see what...

View Article

More fun with the base tag!

I have a post from a few years ago about using the base tag for debugging. Well I just figured out an even cooler way to use it in jsFiddle demos!I have a base jsFiddle demo for just about every plugin...

View Article

Regex Replacement String Math

I needed a simple method to do math within a regex replacement. Basically, a simple way for someone using a plugin to choose between a zero or one based index.Yes, I could have just added an additional...

View Article


Add Anchors to jQuery UI Accordion Headers

If you want jQuery UI's accordion (version 1.10.0+) to be able to open the desired section based on the window hash, you are stuck with using a hash that looks something like this...

View Article


Methods to add multi-line CSS content

I'm sure most of you know that you can add content before or after an element using css; And you can add a line break within that content (spec):HTML <div id="test1">Hello World</div>CSS...

View Article

Convert RGB(A) output to Hex Color

Update from my Convert jQuery RGB output to Hex Color Post Modern browsers will soon support four and eight-digit hex colors, which means you now include an alpha channel with your color. As you can...

View Article

Git untag

If you've ever forgotten to rebase your local repository before pushing a tagged commit to master git push --tags origin master you'll know the pain of having the push rejected with the tag still...

View Article

Browsing latest articles
Browse All 29 View Live




Latest Images