Lightning Components: Will jQuery be unusable after Summer'17 and in future releases?
There are two things with Jquery now:-
It will work with your components if, carefully DOM selectors are used.
Only basic one like changing css, attribute etc. Don't register Events.
Second thing is, it will break any point of time because Jquery is stable but Lightning is not.
It is said that Locker Service allows you to manipulate DOM in scope or in other words we can access DOM elements inside the components elements and perform javascript operations. Actually, the full truth is, we can access DOM element with in the scope and perform a limited set of operation allowed by Locker service. A large set of functions Locker service disable for DOM elements within scope. So, there are ample chances of Jquery break.
Basically jquery seems to work, but what puzzled me first, is that it was not able to select DOM-Elemets inside my own components. It turned out not to work selecting sub-components if they belong to their own namespace like e.g. force:inputField.
Currently due to a bug force:inputField bound to a multiselect picklist-field renders in HTML as a disabled select.
So I have a <select disabled="" ... >
somewhere in my components sub-DOM - and I know that for sure.
Now I put console.log( $("select:disabled") );
in afterRerender().
Having the critical update disabled, I get the expected result, like: Object[select#60:575;a.select]
After enabling the critical update, I get only Object[ ]
- so jQuery could not see into the DOM created by force:inputField. This is caused by Locker Service and as far as I understood a feature and by design.