From d4d9c99de51eb9fade8ee3f7cae43d0b1fe3ad08 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 10 Sep 2012 16:39:43 -0500 Subject: [PATCH] Remove deprecated clickedElement option --- jquery.pjax.js | 4 ---- test/unit/fn_pjax.js | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/jquery.pjax.js b/jquery.pjax.js index 5c481964..1f4e1a5e 100644 --- a/jquery.pjax.js +++ b/jquery.pjax.js @@ -78,7 +78,6 @@ function handleClick(event, container, options) { url: link.href, container: $(link).attr('data-pjax'), target: link, - clickedElement: $(link), // DEPRECATED: use target fragment: null } @@ -153,9 +152,6 @@ function pjax(options) { var target = options.target - // DEPRECATED: use options.target - if (!target && options.clickedElement) target = options.clickedElement[0] - var hash = parseURL(options.url).hash // DEPRECATED: Save references to original event callbacks. However, diff --git a/test/unit/fn_pjax.js b/test/unit/fn_pjax.js index 60c3f5af..71f080fd 100644 --- a/test/unit/fn_pjax.js +++ b/test/unit/fn_pjax.js @@ -111,21 +111,6 @@ if ($.support.pjax) { frame.$("a[href='/dinosaurs.html']").click() }) - asyncTest("sets clickedElement to target jquery object", function() { - var frame = this.frame - - frame.$("a").pjax({ container: "#main" }) - - var link = frame.$("a[href='/dinosaurs.html']")[0] - - frame.$("#main").on("pjax:end", function(event, xhr, options) { - equal(link, options.clickedElement[0]) - start() - }) - - frame.$(link).click() - }) - asyncTest("sets relatedTarget to clicked element", function() { var frame = this.frame