Hello,
I'm having an issue where in my controller, I'm setting values in a collection and storing them in ViewData. eg:
ViewData["ex1"] = new SelectList(ex1); // a simple collection
ViewData["ex2"] = new SelectList(group.Members, "Id", "Gender");
I'm passing these to my View and looping through like this. eg:
<div id="divListBox" style="overflow:auto; border:1px solid #CCCCCC; padding-left:5px; background-color:white; height: 130px">
<%
var list = this.ViewData["e2x"] as SelectList;
var pList = this.ViewData["ex1"] as SelectList;
foreach (var p in list)
{
foreach (var pil in pList)
{
if(pil.Text.Contains(p.Value)) // ex1 does contains ex2
{
%>
<input id="cbPerson" type="checkbox" value="<%= p.Value %>" />
<label for="cbPerson"><%= p.Text %></label>
<input id="cbPersonInfo" type="hidden" value="<%= pil.Text %>" /><br />
<%
}
}
}
%>
</div> ...
and here is my jQuery. eg:
$('#divListBox > input').each(function() {
var personInfo = $('#cbPersonInfo').val();
$(this).append($('personInfo'));
$('*').qtip('hide');
$('#divListBox label').each(function() {
$(this).qtip({
content: personInfo,
show: 'mouseover',
hide: 'mouseout',
style: {
classes: 'ui-tooltip-custom',
tip: true
},
position: {
my: 'left bottom',
at: 'top right'
}
});
});
});
if I set my input type of "hidden" to "text", I see the correct information for each one. Hoever, when i hover over them, the first information shows as tooltip for all of them. I think it may be my jquery but I'm not too sure. I've been dealing with this issue for hours now and still nothing. Can anyone please help?