Posts by Shawii • 131 points
5 posts
-
1
votes1
answer48
viewsA: Save selected colors even by going to another page
An easy way to do this would be using the $rootScope But beware, it is not advised to save functions/methods here, only data. You can inject the dependency into your controller where the user…
-
2
votes1
answer41
viewsA: jquery test table
To get the text of the button clicked and the value of the "Line" you put there you could do something like: $("button").click(function(e){ e.preventDefault(); // pega o texto do elemento clicado…
-
2
votes2
answers2027
viewsA: Send a command to Terminal via C++
It’s already been one millennium time I don’t mess with C / C++ but I think it might help you. #include <stdlib.h> int main (int argc, char* argv[]) { system("mkdir NomePasta"); return 0; }…
-
3
votes2
answers290
viewsA: Autocomplete for forms
Using jQuery to do a small function to fill all inputs when the page is ready: <script> $(document).ready( function() { $("input").each(function(){ // percorre todos elementos "input" do…
-
2
votes2
answers1694
viewsA: Check fields when giving Ubmit and if error return to field
Assuming you want to go to the element #sdEmpresa if(empresa == ""){ $('html, body').animate({ scrollTop: $("#sdEmpresa").offset().top }, 1500); } But I think you should think of a way to optimize…