From c44d4eabd509d660dc00c8046926afb1e5487e8f Mon Sep 17 00:00:00 2001 From: Christian Sanz Date: Sat, 16 Jul 2011 02:41:55 -0700 Subject: [PATCH 1/2] Added input button support and updated Readme --- README.md | 3 +++ src/facebox.js | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8496067..bb5f67a 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Calling facebox() on any anchor tag will do the trick, it's easier to give your jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() + $('input[rel*=facebox]').facebook() }) Any anchor links with `rel="facebox"` with now automatically use facebox: @@ -44,6 +45,8 @@ Any anchor links with `rel="facebox"` with now automatically use facebox: Terms Loads the terms.png image in the box + + Loads the sign-up.html page ### Using facebox programmatically diff --git a/src/facebox.js b/src/facebox.js index 7d0e39d..708a9b4 100644 --- a/src/facebox.js +++ b/src/facebox.js @@ -146,10 +146,14 @@ // support for rel="facebox.inline_popup" syntax, to add a class // also supports deprecated "facebox[.inline_popup]" syntax - var klass = this.rel.match(/facebox\[?\.(\w+)\]?/) + + var rel = $(this).attr('rel') + var href = $(this).attr('href') + + var klass = rel.match(/facebox\[?\.(\w+)\]?/) if (klass) klass = klass[1] - fillFaceboxFromHref(this.href, klass) + fillFaceboxFromHref(href, klass) return false } From 608519a3c37621ec9e444ef80b957de73bb475e7 Mon Sep 17 00:00:00 2001 From: Christian Sanz Date: Sat, 16 Jul 2011 02:43:10 -0700 Subject: [PATCH 2/2] Oops typo fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb5f67a..ef07097 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Calling facebox() on any anchor tag will do the trick, it's easier to give your jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() - $('input[rel*=facebox]').facebook() + $('input[rel*=facebox]').facebox() }) Any anchor links with `rel="facebox"` with now automatically use facebox: