dexim
February 5, 2017, 11:18am
1
I have review - but i don’t know what change
help please
http://deximlabs.com/dexjobs/
PROPER EVENT BINDING: Consider using the preferred .on() method rather than .click(), .bind(), .hover(), .load(), .ready(), etc. For best performance and concise code use event delegation whenever possible: https://codepen.io/32bitkid/post/understanding-delegated-javascript-events
- http://envato.d.pr/j3jg
Hi,
You need to modify your code. What does this mean?
###For example if you have .click function
$('#whatever').click(function() {
/* your code here */
});
####You need to use:
$('#whatever').on('click', function() {
/* your code here */
});
And same concept for all your functions.click(), .bind(), .hover(), .load(), .ready()
Check this stackoverflow post to see difference between .on(‘click’) vs .click()
The idea is to optimize your code for faster page loading.
dexim
February 5, 2017, 12:16pm
3
Thx it’s help me
i have another bug
CACHE JQUERY OBJECTS: Please cache the jQuery objects that are used more than once when it’s possible, this will help a lot with performance of the site.
do you have solutions?