Posts by sannyas • 218 points
6 posts
-
1
votes3
answers1008
viewsA: How to list objects in Javascript
For no problem with browser incompatibility use the for var obj = { nome: "Marcos", snome: "Bonado", idade: "314", email: "[email protected]", tellW: "0123456789" }; for (var k in obj){ if…
-
1
votes4
answers155
viewsA: How to create function with SINGLE BUTTON to open multiple class together?
You can use the property slideToggle and slideDown of Jquery $( "button" ).click(function() { if(!$(this).hasClass('todos')){ $( this ).prev('.cor').slideToggle( "fast" ); }else{…
-
9
votes3
answers291
viewsQ: Is it correct to write CSS with Javascript?
I see a focus on javascript frameworks, to write the css directly in javascript, example... new Vue({ el : "#style", data : { ctn : { display: "flex", alignItems: "center", justifyContent: "center",…
-
0
votes4
answers707
viewsA: Function . click does not work on buttons that were dynamically generated by the . html function?
Define a promisse, gets like this... Set the click event as a function function comp(){ $("button[name='btnAtender']").on('click',function(){ alert('teste'); }); } When placing the html…
-
5
votes2
answers124
viewsA: Is there a 'native' way of the <form> tag to identify changing the original state of a form?
You can compare 2 object arrays in the commit, that is the result of the database with the one that will send example... When giving Ubmit serialize the form and convert to json var formdata =…
-
1
votes2
answers45
viewsA: Update visits when opening the site
function visitas($conexao, $visita = '') { $query = "update visita set visitas= visitas + 1"; return mysqli_query($conexao, $query); } visitas($conexao); …