Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Fix for issue #236. Take 2. #248

Merged
merged 1 commit into from
Jan 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/components/PersonaCard/Jquery.PersonaCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
$(this).addClass('is-active');

/** Function for switching selected item into view by adding a class to ul. */
var updateForItem = function(item){
var wrapper = document.getElementById("detailList");
var updateForItem = function(wrapper, item){
var previousItem = wrapper.className + "";
var detail = item.charAt(0).toUpperCase() + item.slice(1);
var nextItem = "ms-PersonaCard-detail"+detail;
Expand All @@ -38,7 +37,7 @@
/** Get id of selected item */
var el = $(this).attr('id');
/** Add detail class to ul to switch it into view. */
updateForItem(el);
updateForItem($(this).parent().next().find('#detailList')[0], el);

/** Display the corresponding details. */
var requestedAction = $(this).attr('id');
Expand Down