Getting " object has no method 'addclass'" error

Getting " object has no method 'addclass'" error

Heya everybody,

I'm still quite a newbie concerning jQuery, so I suppose the problem exists on my side and not in jQuery.

I'm getting the error 

  1. Uncaught TypeError: Object [object Object] has no method 'addclass'
    1. (anonymous function) / pre-alpha/:27
    2. d.extend._Deferred.f.resolveWith jquery.min.js:16
    3. d.d.extend.ready jquery.min.js:16
    4. d.c.addEventListener.y

I'll just post you all my script code and the affected html elements, it's not so much anyway and that way I think you might find my error most easily.
  1. <link rel="stylesheet" href="css/jquery-ui-1.8.11.custom.css" type="text/css" media="all" />
  2. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
  3. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>

  4. <script type="text/javascript"> //this is line 16 originally

  5.       $(function() {
  6.       $("a#login").attr("href", "javascript:if ($('div#login').css('display')=='none') {$('div#login').show('350');} else{$('div#login').hide('350');}");
  7.             $( "#radio1" ).buttonset();
  8.             $( "#radio2" ).buttonset();
  9.             $( "#radio3" ).buttonset();
  10.             $( "#radio4" ).buttonset();

  11.             $( "div#rating_select" ).addclass("skinning-on"); //this is line 27 originally
  12.             $( "div#sort_select" ).addclass("skinning-on");
  13.             $( "div#howmany_select" ).addclass("skinning-on");
  14.             $( "div.skinned-select .select-text" ).show();

  15.             $( "select" ).attr({
  16.                   onkeyup: "this.blur();this.focus();",
  17.                   onchange: "$(this).prev('.select-text').html(this[selectedIndex].text)"
  18.             });
  19.             //I add the classes and change the href, etc, via JS so that someone browsing with NoScripT still gets             a functioning page per default
  20.       });
  21. </script>

  1. <!-- HTML elements following now -->

  2. <p>For administrative tasks, please <a id="login" href="login.php">login</a>.</p>
  3. <div id="login"><!-- still empty at this time --></div>

  4. <!-- Four times this (with different IDs of course) -->
  5. <div id="radio1">
  6.       <input type="radio" id="radio1_1" name="radio1" checked="checked" /><label for="radio1_1">is</label>
  7.       <input type="radio" id="radio1_2" name="radio1" /><label for="radio1_2">contains</label>
  8. </div>
  9.  
  10. <!-- 3 times these, also with different IDs -->
  11. <div id="rating_select" class="skinned-select">
  12.       <div class="select-text">overall rating better</div>
  13.       <select>
  14.             <option>overall rating better</option>
  15.             <option>less negative articles</option>
  16.             <option>more positive articles</option>
  17.       </select>
  18.       <span class="select-button">▼</span>
  19. </div> <!-- End of skinned-select -->


These are all elements that have connections to JS on my site. I tried to remove as much clutter as possible (other elements, Smarty code, etc.) Hope this is okay like this.

Thanks for you help in advance!

Runo