Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

don bencilao
4,153 PointsTypeError: 'undefined' is not a function (evaluating
Hi I'm getting an error, but it is not affecting the result of the code.
TypeError: 'undefined' is not a function (evaluating '( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args )')
what is wrong with my code?
$(document).ready(function(){
$(".quoteform").on("click","button", function(){
var $price = $("#terminate").on("change","option").val();
var $area = $("#area").val();
var $total = $area * $price;
if($price == 0){
alert("please choose a pest");
}else{
$("#quote").attr("value",$total);
}
});
});
1 Answer

Victor Rodriguez
15,015 PointsIf you are using Wordpress, use jQuery as the variable name, not $. JQuery(document).ready(function(){ instead of $(document).ready(function(){ here is some info on that if you are curious: http://api.jquery.com/jQuery.noConflict/
don bencilao
4,153 Pointsdon bencilao
4,153 Pointsno i'm not using it on wordpress.