scriptygoddess

Archive for the ‘Javascript’ Category

Not too much to explain here – wanted to embed a vimeo video, and wanted it to autoplay, but wanted the volume set to mute to start… <div id="myvideo"></div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script type="text/javascript"> function vimeo_player_loaded() { moogaloop3 = document.getElementById('myvideo'); moogaloop3.api_setVolume(0); } var flashvars = { 'clip_id': '29950141', 'server': 'vimeo.com', 'show_title': 0, 'show_byline': 0, 'show_portrait': […]

This is a really simple piece of jquery that will launch all external links on the page in a new window. jQuery(document).ready(function(){ jQuery("a[href*='http://']:not([href*='http://yourdomain.com'])").attr("target","_blank"); jQuery("a[href*='https://']:not([href*='https://yourdomain.com'])").attr("target","_blank"); }); Updated to add: Here is a modification in case you want to allow links to subdomains to open in the same window… jQuery("a[href*='http://']:not([href*='http://yourdomain.com'])").not("[href^='http://subdomain.yourdomain.com']").attr("target","_blank"); Another update Here is another modification that […]

By Guest Author: James Mowery With the explosion of web usage over the past decade, the online applications that users have access to have become more sophisticated as each year passes. While 'internet time' is even faster than the proverbial 'dog years', one recent development has radically altered online applications and will continue to do […]

Comments Off on Building Ajax Solutions With Usability And Accessibility

Ran into a bizarre problem today using swfobject. A lot of wasted time, but I'll give you the short story / solution. I'm not sure of what other factors played a role (the fact that the element was in a absolute positioned container, or that the immediate container to the flash element was in a […]

08 Aug, 2009

Adding alternate row styles to a table with JQuery

Posted by: Jennifer In: jquery

JQuery's simplicity is so wonderful and powerful. Here's a perfect example. If you have a table, and you want to alternate the row colors. To do so, all you need is this: $(document).ready(function() { $("table.striped tr:nth-child(even)").addClass("altrow"); }); Then, just add class="striped" to your table tag, and jquery will automatically apply add the class "altrow" to […]

A recent project I've been working on involved a portfolio page that required a "carousel" type browser. It also needed to have multiple rows (so that images could be grouped into various projects). Also, because this page would contain a large number of images, it was required that the images not be loaded until you […]

01 Feb, 2009

jQuery Side Scroll

Posted by: Jennifer In: jquery

(This post has been almost completely re-written. Usually I don't that – but I thought it would be more confusing to have all the changes, strikeouts, etc.) For a project I'm going to be working on, I needed to create a navigation piece that had different panes scrolling/sliding in from the right depending on what […]

20 Sep, 2008

Overlapping Tabbed Navigation using CSS and jQuery

Posted by: Jennifer In: CSS|jquery

Recently had a project land on my desk that required tabbed navigation that overlap one another. Just so we're clear on what we're doing: here's the demo. Here is how I did it: 1) Each tab has four "states" – Off, Off (with right tab on), On, On (with right tab on). I combined each […]

Here's a method you can use with the validation jQuery plugin to make sure a field (like a password field) includes at least one number. $.validator.addMethod("atleastonedigit", function(pass) { if (pass == "") { return true; } return ((/[0-9]+/).test(pass)); }, "This field must contain at least one number");

13 May, 2008

Proportional Scaling Calculator

Posted by: Jennifer In: Javascript|Scripts

I'm sure this has been done before since it's pretty simple – I just couldn't find it quick enough when I needed it. And since it is so simple, it was easier to just create my own personal little calculator than dig around, find one, bookmark. (or worse yet, do the math on a little […]


Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements