{"aTargets": [ "objective" ],
"bSearchable": false,
"bSortable": false,
"sClass": "highlight",
"fnCreatedCell":
function (nTd, sData, oData, iRow, iCol) {
jQuery(nTd).css('cursor','pointer')
//jQuery(document).ready(function() {
jQuery('<tr class="'+oData[1]+'-showit2 hidden"><td colspan="13" style="background:#FFF899; padding:10px;">'
+'<h1>'+oData[2]+'</h1>'
+'<div style="display:inline-block; padding-right:20px" class="fundinfo">'
+'<h2>Fund Info</h2>'
+'<p>Symbol: '+oData[1]+'</p>'
+'<p>Name: '+oData[2]+'</p>'
+'<p>Objective: '+oData[0]+'</p>'
+'<p>Assets: '+oData[4]+'</p>'
+'<p>Exp. Ratio: '+oData[11]+'</p>'
+'</div>'
+'<div style="display:inline-block;" class="fundperf">'
+'<h2>Fund Performance</h2>'
+'<p>Quarter: '+oData[5]+'</p>'
+'<p>1 Year: '+oData[6]+'</p>'
+'<p>3 Year: '+oData[7]+'</p>'
+'<p>5 Year: '+oData[8]+'</p>'
+'<p>10 Year: '+oData[9]+'</p>'
+'</div>'
+'<div class="bench">'
+jQuery("."+sData+"-showit").html()
+'</div>'
+'</td><tr>').insertAfter("tr."+oData[1])
//});
jQuery(nTd).click(function() {
if(jQuery('tr.'+oData[1]+'-showit2').is(':hidden')){
jQuery(this).parent('tr').css({'color':'#cccccc'})
jQuery('tr.'+oData[1]+' td.highlight').css({'color':'#000000'})
jQuery(this).show('slow').css({'border-bottom-color':'#FFF899','background-color':'#FFF899'})
jQuery('tr.'+oData[1]+'-showit2').show('slow');
}else{
jQuery(this).parent('tr').css({'color':'#000000'})
jQuery(this).css({'border-bottom-color':'#cccccc','background-color':''})
jQuery('tr.'+oData[1]+'-showit2').hide();
}
1) Is there an alternative to the document.ready framework i should be using?
2) Should I use this .insertAfter function in a different callback?
It looks like you're new here. If you want to get involved, click one of these buttons!
Get useful and friendly help straight from the source.