Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating to be compliant with 1.3

  • Loading branch information...
commit 21166898cdbf539f5228258c045525f2a005a1d3 1 parent a0b473b
@darkwing authored
Showing with 6 additions and 4 deletions.
  1. +5 −3 Source/Clickables.js
  2. +1 −1  package.yml
View
8 Source/Clickables.js
@@ -44,10 +44,12 @@ var Clickables = new Class({
this.elements.each(function(el) {
//get the href
- var anchor = el.getElements('a' + (this.options.selectClass ? '.' + this.options.selectClass : ''))[0];
-
+ var elements = el.getElements('a' + (this.options.selectClass ? '.' + this.options.selectClass : ''));
+
//if we found one
- if($defined(anchor)) {
+ if(elements.length) {
+
+ var anchor = elements[0];
//add a click event to the item so it goes there when clicked.
this.setClick(el,anchor.get('href'));
View
2  package.yml
@@ -1,6 +1,6 @@
name: Clickables
author: davidwalsh
-current: 1.1
+current: 1.2
category: Interface
tags: [events,links]
docs: http://davidwalsh.name/js/clickables
Please sign in to comment.
Something went wrong with that request. Please try again.