Toggle function in Safari

Toggle function in Safari

Hi there,

i`m pretty new in jquery and i`m trying to make a button to toggle the background image. It works fine in Firefox but not in Safari. I hope someone can help me to get it working....

  1.   <script type="text/javascript">
  2.     $("#togglebutton").toggle(
  3.       function () {
  4.         $("#pagewrapper").css({"background":"url(images//bg_wrapper_2.jpg"});
  5.       },
  6.       function () {
  7.         $("#pagewrapper").css({"background":"url(images//bg_wrapper_1.jpg"});
  8.       }
  9.     );