Anyone see why this code might not work?
this code works:
-
- $('#offer span').click(function(){
- var $divx = $('#offerbody').first();
- $(this).html( $divx.is(':visible') ? ' [+] ' : ' [–] ');
- $divx.slideToggle();
- });
-
-
this code does nothing (I was hoping it would make the div hidden):
-
- $(document).ready(function () {
- var $divx = $('#offerbody').first();
- $divx.css('visibility','hidden');
- $(this).html( $divx.is(':visible') ? ' [+] ' : ' [–] ');
-
- });