|
#1
|
||||
|
||||
![]()
بسم الله الرحمن الرحيم
السلام عليكم ورحمة الله تعالى وبركاته لدي كود Jquery يقوم بعمل تأثيرات على dropdown أو menu لكن أردت اضافة خصائص css على جدول بطريقة Jquery لكن لم تشتغل بعد البحث وجدت أن هذا الكود هو السبب بواسطة أداة firebug يعطيني الخطأ التالي رمز PHP: TypeError: $.props is undefined typeof $.props['transform'] == 'undefined' وهذا كود Jquery رمز PHP: (function ($) { // Monkey patch jQuery 1.3.1+ css() method to support CSS 'transform' // property uniformly across Webkit/Safari/Chrome and Firefox 3.5. // 2009 Zachary Johnson www.zachstronaut.com function getTransformProperty(element) { // Try transform first for forward compatibility var properties = ['transform', 'WebkitTransform', 'MozTransform']; var p; while (p = properties.shift()) { if (typeof element.style[p] != 'undefined') { return p; } } // Default to transform also return 'transform'; } var proxied = $.fn.css; $.fn.css = function (arg) { // Find the correct browser specific property and setup the mapping using // $.props which is used internally by jQuery.attr() when setting CSS // properties via either the css(name, value) or css(properties) method. // The problem with doing this once outside of css() method is that you // need a DOM node to find the right CSS property, and there is some risk // that somebody would call the css() method before body has loaded or any // DOM-is-ready events have fired. if ( typeof $.props['transform'] == 'undefined' && ( arg == 'transform' || ( typeof arg == 'object' && typeof arg['transform'] != 'undefined' ) ) ) { $.props['transform'] = getTransformProperty(this.get(0)); } // We force the property mapping here because jQuery.attr() does // property mapping with jQuery.props when setting a CSS property, // but curCSS() does *not* do property mapping when *getting* a // CSS property. (It probably should since it manually does it // for 'float' now anyway... but that'd require more testing.) if (arg == 'transform') { arg = $.props['transform']; } return proxied.apply(this, arguments); }; })(jQuery); أكثر... |
مواقع النشر (المفضلة) |
|
|
![]() |
||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
[طلب] مساعدة في كود Jquery و CSS | RSS | Arabic Rss | 0 | 10-12-2013 02:34 PM |
Jquery | هـيدر | RSS | Arabic Rss | 0 | 06-03-2011 08:11 PM |
[ غير ذلك ] مساعدة في في اضافات jquery | RSS | Arabic Rss | 0 | 06-01-2011 09:54 PM |
مساعدة و توضيح للأدارة المنتدى | RSS | Arabic Rss | 0 | 11-13-2010 02:42 AM |
مساعدة يعرفون لموآقع التوبيكآت بليز مسآعده كيف اخلي التوبيكآت ب الطول مو العرض في صوره توضحي | RSS | Arabic Rss | 0 | 10-18-2010 02:21 PM |
|