Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. Show all posts

Saturday, April 16, 2011

Add Spoilers to your Website

Don't Spoil the Surprise for Your Readers
Blogging covers many topics including Movies, Books or other mediums where readers may not be ready for all of the details just yet. In times like those it's handy to provide a safe browsing experience so a visitor can choose whether to read a certain detail or not. That's where this handy script and CSS come in.

Easily Add Spoiler Blocks and Inline Text
Spoiler blocks are simple, until a reader takes an action the information is hidden. It's up to them what they do and do not see. I've written a short script using JQuery with the basic styles necessary to make things work. Once these components are added to a blog it's a simple process to include hidden spoilers within posts. Include the below script includes and CSS in your template <head> block to make it work.

Friday, April 1, 2011

JQuery Script Problems

If you use one of my several widgets or scripts that use JQuery, you may have noticed some performance issues this morning. Apparently, while I've been working on a new article and exercising the script include I use from the jquery site was changed. After some investigating my own performance degradation I've come up with a solution to the problem.

The JQuery publisher has permanently moved the source code to a new location. If you open up any of the scripts I've posted or instructions, you'll find a line similar this:
<script src='http://jquery.com/src/jquery-latest.js'/>

That single line must have it's source changed to this new path:
http://code.jquery.com/jquery-latest.js
Update your scripts to reflect the change and you should be good to go. It looks like I'll be spending this afternoon updating several scripts and posts to reflect this. Sorry for the inconvenience, but it was beyond my control. I suppose I'll have to look for a more controlled solution in the future.

Wednesday, February 23, 2011

Blogger: JQuery External Links in a New Window

Around the beginning of the year I introduced a simple javascript to automatically update links to another domain contained in the blog section to open in a new window. This script worked pretty well, but had a drawback of relying on the onload event for the page body. As a result for some time while a page loaded, links would remain unchanged. In order to address this shortcoming I've improved my method with the use of JQuery.

Saturday, January 22, 2011

Blogger: Animated Collapsible Widgets with JQuery

I began experimenting with JQuery this week while working on another project. It is my first experience with the library, having been away from web development until recently. While reading the documentation and experimenting I came across a nice animation effect similar to the function of the Collapsible Widgets script from earlier this week. So, I thought why not take things to the next level and add those animations.

Adding the Script to Your Blog
First things first, let's add the script to the template. Open up Design->Edit HTML then search for the </body> tag. Copy and paste this script just above that </body> tag.