function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mano lavanya 24Mano lavanya 24 

Jquery plugin is not working when we enable Locker service

Hi All,

I'm facing issue when I load Lightning page with Locker Service enabled.
When I deactivate the "Locker Service", the slider [Jquery Plugin] is working fine in my lightning page.
I'm using "Slider" js files from Static Resources for my lightning page.

With Locker Service Enabled:
User-added image

Without Locker Service
User-added image

When page get loads,we're getting the following error
" WARNING: SecureElement: [object HTMLDivElement]{ key: {"namespace":"c"} } does not allow getting/setting the disabled attribute, ignoring!"

I've explored it in salesforce document, in which they told that "they can served from Static Resources and approved by security".
For Reference:
https://developer.salesforce.com/blogs/developer-relations/2016/04/introducing-lockerservice-lightning-components.html

Do we need to do any other process to get approve?
Can you please let us know how to get approve for static resource?

 

ShaminaShamina
Hello,

We are encountering the same issue when using JQuery in a Lightning component, did you find a solution for this ? 

Best Regards,
Shamina
Ranu Jain SFDCRanu Jain SFDC
Hi,
I have to use the slider whenlocekr service is enabled. Using below code - 

      $().ready(function(){
            $.slidebars();
            console.log('------slidebars---');
        }); 

its giving me error.
this works fine with locker service is disabled.

Thanks
Ranu