Posts Tagged ‘Javascript’

Another Simple jQuery Gallery Idea

Tuesday, November 9th, 2010
Another Simple jQuery Gallery Idea

Lock and Load that HTML

A co-worker had asked me for some help the other day on the jQuery running his gallery. Of course, I was more than happy to help. He ran into other issues later (which he cleared up) involving a plugin, but that doesn’t really matter in this demo/tutorial. What he wanted was to have a navigation at the top, each item pertaining to a different part of his portfolio (websites, flash work, graphic design…). Each section though had a ton of information that would increase the page load significantly if they were all loaded on the page at the same time. That ruled out putting a simple hide/show on some divs. My thought was, why don’t we put the HTML into separate files, and load them when a user clicks on one of the nav items. You can check out the gist of what was trying to be accomplished by check out the demo below.

View Demo

(more…)

Thinking Outside The Box With jQuery

Wednesday, September 22nd, 2010
Thinking Outside The Box With jQuery

Is it waves ahead of Flash?

NOTE: Stick through to the end of the article, and I’ll give you a cool link for a reward!
No, but it can still do a lot of cool crap. Today I was noodling around and somehow this idea popped into my head. Normally, at my current place of employment, we build animations using Flash. Butterflies fluttering around, fades and what-not, hell I even did a water ripple effect once. I thought, what if we could do some of the simple banners that are just plain fades and use jQuery instead of Flash to do everything. My initial idea was, what if a client has a photo of a beach, and he wants the stupid water to move. Could I do something in jQuery instead of having to rely on Flash?

The set up

My HTML for the demo is easy: a container div, 1 div with the original image, and 2 additional divs with only the water section of the image. 3 divs, 2 seperate images. The images are pretty large, because in this demo I was going for a rough effect rather than bringing the size down.

(more…)

Actually Knowing What You Are Doing – jQuery Addition

Tuesday, September 21st, 2010
Actually Knowing What You Are Doing – jQuery Addition

THAT’S why we do that

There are times that we learn to do something in web development, and we do them without really knowing the reason why we do it. For instance. I learned a couple of things today about jQuery. The first thing was about return false; versus preventDefault (which I learned here). Now, I know the difference. The return false; kills event bubbling. That’s great, right? We don’t want that crap going up through the DOM. But what if you did? An example would be if you wanted to prevent a link from actually doing what the browser expects a link to do, AND have the parent div do something as well.

(more…)

Adding Scripts, CSS, And Extras – When Is It Too Much?

Thursday, September 9th, 2010
Adding Scripts, CSS, And Extras – When Is It Too Much?

Let’s stick that in there too!

Ok, I will admit that this topic just popped into my head, mainly because of what I was doing at work, and then thinking of the HTML5 Boilerplate. I’m using that as a starting point to illustrate what I am talking about, not bashing it. I think the template is awesome and I am using it in my personal projects.

Let’s say we are using it to start a new site. It has a lot of awesome things in it to compensate for a ton of stuff. It has jQuery, a ready to go script page for your js, a nicely organized style sheet, dd-belatedpng.js for png support in IE6, Google Analytics code, Modernizer 1.5 js for HTML5 tag support in browsers that don’t actually support HTML5…and a few other things I can’t remember at the moment. For argument’s sake though, let’s just pretend that is it.

(more…)

Creating a simple jQuery Gallery

Thursday, August 12th, 2010
Creating a simple jQuery Gallery

Thinking it through

I can’t claim anything new with this, but I would like to show you how to use jQuery to build a very simple image gallery. This one really hit home on how important it is to think your way through what you want jQuery to do BEFORE you start writing the code. You will find that you get into trouble if you don’t.

Click here to see the demo.

Binary Solo!

Ten points if you can comment and tell me what HBO show that heading is from. Anyway, on to the code! I will leave out the css because it is really irrelevant. You can style your gallery however you want. This is just for demo purposes.

(more…)