hi all,
I have a simple javascript function (below) that basically just displays a row in a table
What I would like to do is convert this to jQuery and make use of the inbuilt fade function
The row of the table is named coc*** (***being there are multiple of these rows so need to pass the name of it as a variable to the function, hence rowID in my original code)
I hope you can make sense of this I have just started with jQuery and not sure I understand how to do this type of thing.
Thanks in advance,
James
I have a simple javascript function (below) that basically just displays a row in a table
Code:
// This will hide/show the comments on comments table row
function displayRow(rowId){
// Toggle visibility between none and inline
if ((document.getElementById(rowId).style.display == 'none'))
{
document.getElementById(rowId).style.display = 'inline';
} else {
document.getElementById(rowId).style.display = 'none';
}
}
What I would like to do is convert this to jQuery and make use of the inbuilt fade function
Code:
$(document).ready(function(){
$("coc^").blur(function(){
$(this).fadeIn('medium');
}
});
The row of the table is named coc*** (***being there are multiple of these rows so need to pass the name of it as a variable to the function, hence rowID in my original code)
I hope you can make sense of this I have just started with jQuery and not sure I understand how to do this type of thing.
Thanks in advance,
James