Posts by Diego Lopes Lima • 2,328 points
58 posts
-
5
votes4
answers11708
viewsA: How do I call a function by pressing Enter in <input>
I think something like that: $(document).on('keydown', function(event) { if(event.keyCode === 13) { // Sua função aqui } });
-
0
votes4
answers702
viewsA: What are the best practices of representing SQL within PHP code?
I believe that there is no more correct form, I usually write in the same line, some organize in several to facilitate reading, but if the theme is organization I would say I like the way it is…
-
3
votes2
answers180
viewsA: Is there a plugin or CSS code generator for Shapes(Shapes)?
I don’t know a specific tool for that, but I believe Google Web Designer can help expedite the process by giving you a graphical interface for this.…
cssanswered Diego Lopes Lima 2,328 -
14
votes6
answers15594
viewsA: How to do a search ignoring Javascript accent?
Something involving dynamic regular expressions can sort of solve the problem. I’ve had to do something like this in my jQuery plugin but not involving accentuation. I think something like this…
-
1
votes3
answers2418
viewsA: Force jQuery event execution order
There really isn’t a way to do this, but if it helps, you can delegate a load event to run your script. So it will only run when all page components, including the last one, are loaded.
-
3
votes5
answers1657
viewsA: How to add class to the next element when clicking the button?
Something like that? $('.next').on('click', function() { $('ul>li.active').removeClass('active').next('li').addClass('active'); }); $('.prev').on('click', function() {…
javascriptanswered Diego Lopes Lima 2,328 -
2
votes8
answers48548
viewsA: How to pass parameters in function calls by reference in Javascript?
From what I understand you want to pass parameters to the function retornaNada as it passes it as jQuery function parameter on... As far as I know there is no way to do this within good practice,…
-
0
votes3
answers595
viewsA: Responsive images
It also helps a lot in the performance to decrease the weight of the images using some add-on like the imagemin that is available for Grunt and to Gulp if it helps your case.…