开发者

Error with Jquery on line 3539 with IE

开发者 https://www.devze.com 2023-03-24 21:26 出处:网络
I\'ve an error with JQuery on the first line of : $(\'select#operation option:selected\').each(function() {

I've an error with JQuery on the first line of :

    $('select#operation option:selected').each(function() {
        parent_value = $(this).val();
    });

I got an other error with /jquery-1.5.1.js on line 3539 :

        if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {

Everything i working 开发者_StackOverflow社区on FF, Chrome and Safari but i got errors on IE.

The errors are : "Object doesn’t support this property or method"


Sizzle (the library jQuery uses behind the scenes to select elements), does not function well if you add your own methods to Object.prototype; which, from your earlier question today, you are doing!

As I commented in your previous question, adding members to Object.prototype is highly frowned upon.... now you can see why :). Instead of adding the methods to the Object prototype, simply define them as functions.


Not a direct answer to your problem but I think you would be better doing this:

parent_value = $('#operation').val();
0

精彩评论

暂无评论...
验证码 换一张
取 消