Skip to content

Commit

Permalink
Make clearing work properly with dynamic content.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Nov 1, 2012
1 parent 9f293d1 commit 00960db
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -54,10 +54,15 @@

doc.on('click.fndtn.clearing', 'ul[data-clearing] li', function (e, current, target) {
var current = current || $(this),
target = target || current;
target = target || current,
settings = current.data('fndtn.clearing.settings');

e.preventDefault();

if (!settings) {
current.parent().foundationClearing();
}

// set current and target to the clicked li if not otherwise defined.
methods.open($(e.target), current, target);
methods.update_paddles(target);
Expand Down Expand Up @@ -150,7 +155,7 @@
});
},

assemble : function ($li, target) {
assemble : function ($li) {
var $el = $li.parent(),
settings = $el.data('fndtn.clearing.settings'),
grid = $el.detach(),
Expand Down

0 comments on commit 00960db

Please sign in to comment.