check for modal classname

make sure that were actually handling a `.modal` element.