[SOLVED] Script doesn't work since jQuery 1.6

[SOLVED] Script doesn't work since jQuery 1.6

Hello, I would like to update my website by using the newest jQuery (1.8.3).

The code below works with jQuery before 1.6. Could you please help me to update my code ?

  1. jQuery.noConflict();

  2. jQuery(document).ready(function($) {
  3. $('[class^=toggle]').hide();
  4. $('[class^=link]').click(function() {
  5. var $this = $(this);
  6. var x = $this.attr("className");
  7. $('.toggle-' + x).toggle(400);
  8. return false;
  9. });
  10. });
Thank you in advance.