Created
January 23, 2012 17:54
-
-
Save stevenpsmith/1664512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
activities.each(function(activity){ | |
var renderedItem = template(activity.toJSON()), | |
$renderedItem = $(renderedItem); //convert the html into an jQuery object | |
$renderedItem.jqmData('activityId', activity.get('id')); //set the data on it for use in the click event | |
$renderedItem.bind('click', function(){ | |
//set the activity id on the page element for use in the details pagebeforeshow event | |
$('#activity-details').jqmData('activityId', $(this).jqmData('activityId')); //'this' represents the element being clicked | |
}); | |
listView.append($renderedItem); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment