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
- Uncaught TypeError: Object [object Object] has no method 'addclass'
-
(anonymous function)
/
pre-alpha/:27
-
-
-
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.
- <link rel="stylesheet" href="css/jquery-ui-1.8.11.custom.css" type="text/css" media="all" />
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
- <script type="text/javascript"> //this is line 16 originally
- $(function() {
- $("a#login").attr("href", "javascript:if ($('div#login').css('display')=='none') {$('div#login').show('350');} else{$('div#login').hide('350');}");
-
- $( "#radio1" ).buttonset();
- $( "#radio2" ).buttonset();
- $( "#radio3" ).buttonset();
- $( "#radio4" ).buttonset();
-
- $( "div#rating_select" ).addclass("skinning-on"); //this is line 27 originally
- $( "div#sort_select" ).addclass("skinning-on");
- $( "div#howmany_select" ).addclass("skinning-on");
- $( "div.skinned-select .select-text" ).show();
- $( "select" ).attr({
- onkeyup: "this.blur();this.focus();",
- onchange: "$(this).prev('.select-text').html(this[selectedIndex].text)"
- });
- //I add the classes and change the href, etc, via JS so that someone browsing with NoScripT still gets a functioning page per default
- });
- </script>
- <!-- HTML elements following now -->
- <p>For administrative tasks, please <a id="login" href="login.php">login</a>.</p>
- <div id="login"><!-- still empty at this time --></div>
- <!-- Four times this (with different IDs of course) -->
- <div id="radio1">
- <input type="radio" id="radio1_1" name="radio1" checked="checked" /><label for="radio1_1">is</label>
- <input type="radio" id="radio1_2" name="radio1" /><label for="radio1_2">contains</label>
- </div>
-
- <!-- 3 times these, also with different IDs -->
- <div id="rating_select" class="skinned-select">
- <div class="select-text">overall rating better</div>
- <select>
- <option>overall rating better</option>
- <option>less negative articles</option>
- <option>more positive articles</option>
- </select>
- <span class="select-button">▼</span>
- </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