I have the following code
$('.rsName').ready(if{($('.companyName').html() == $(this).html()){
$(this).siblings(".rsDistribution").slideDown('slow', function() {});
});
What I’m trying to do, is check if rsName and companyName are equal. If they are equal, I’d like to slide down the .rsDistribution which is a sibling div of rsName.
Any ideas why this isn’t working?
You had an incorrect opening brace
$(‘.rsName’).ready(if { <—–
Also, you need to pass a function to the ready handler, which is customarily written:
$(function() {I also took out the callback, since you weren’t doing anything with it.
EDIT