xhtml:
<ul class="groupsWrapper">
<ui:repeat value="#{connectDashBoardBean.groups}" var="group">
<ui:fragment rendered="#{group.activeGroup}">
<li class="group titleToolTip chooseSubGroup" title="Click To Choose">
<div style="display: none;" class="groupId">#{group.groupId}</div>
<div class="groupContainer">
<div class="groupImage" style="float:left;color: #fff">
<h:graphicImage value="#{group.groupIconPath}" height="70" width="70"/>
</div>
<div class="groupContent" style="display:inline-block;padding: 0;word-wrap: break-word;font-weight: bold;">
<h:outputText value="#{group.groupName}"/>
</div>
<!-- <div class="groupTotalSubGroup" style="display:block;padding: 0;word-wrap: break-word;">
<h:outputText value="Sub Group:#{group.totalSubGroup}"/>
</div> -->
<div class="groupFollower" style="display:block;padding: 0;word-wrap: break-word;">
<h:outputText value="Followers:#{group.totalFollower}"/>
</div>
<div class="activeThread" style="display:block;padding: 0;word-wrap: break-word;">
<h:outputText value="Active Thread:#{group.totalActiveThread}"/>
</div>
</div>
</li>
</ui:fragment>
</ui:repeat>
</ul>
查询:
var group = $(this).find('.groupId').text();
总是让我空空如也,我尝试过text()
,html()
和val()
我在.tooltipster()
ajax 调用中使用这个选择器
$('.chooseSubGroup').tooltipster({
content: 'Loading...',
functionBefore: function (origin, continueTooltip) {
// we'll make this function asynchronous and allow the
// tooltip to go ahead and show the loading notification
// while fetching our data
continueTooltip();
// next, we want to check if our data has already been
// cached
if (origin.data('ajax') !== 'cached') {
var group = $(this).find('.groupId').text();
alert(group);
$.ajax({
type: 'GET',
url: 'tooltip/sub_group_tooltip.xhtml?groupId=' + group,
data: {
groupId: group
},
success: function (data) {
// update our tooltip content with our returned
// data and cache it
origin.tooltipster('update', data).data('ajax',
'cached');
}
});
}
},
interactive: true,
interactiveTolerance: 350,
onlyOne: true,
theme: '.tooltip-theme',
trigger: 'click',
updateAnimation: true,
arrow: true,
position: 'right',
delay: 500
});
请让我知道如何获得隐藏 div 的值?
提前致谢