Skip to content

Commit

Permalink
Merge pull request #186 from defunkt/remove-deprecated-clicked-element
Browse files Browse the repository at this point in the history
Remove deprecated clickedElement option
  • Loading branch information
chris123457 committed Sep 11, 2012
2 parents 99ad673 + d4d9c99 commit e95ff46
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions jquery.pjax.js
Expand Up @@ -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
}

Expand Down Expand Up @@ -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,
Expand Down
15 changes: 0 additions & 15 deletions test/unit/fn_pjax.js
Expand Up @@ -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

Expand Down

0 comments on commit e95ff46

Please sign in to comment.