Questions tagged as 'jquery'

1
answer

How do I get the value of a select and fill in an input?

<?php$con=mysql_connect("localhost","root","") or die("Failed to connect with database!!!!"); mysql_select_db("bancoteste", $con); $sth = mysql_query("SELECT * FROM pessoa"); ?> <!DOCTYPE html> <html> <hea...
asked by 01.07.2016 / 03:28
2
answers

Capture document click to close menu that is open

I'm implementing a function in my menu where it will close the contents of the dropdown that is open IF the click is anywhere except in the menu itself. $(document).click(function(event) { var $menuOpened = $('.dropdown-content');...
asked by 25.01.2017 / 20:12
1
answer

About each, this and attr in jQuery [closed]

Good morning friends, I have a big question regarding these attributes (if I may say so), I would actually like to really understand how each of them works, I wanted to understand why use each one of them, since I already thank and apologize if t...
asked by 26.01.2017 / 14:08
2
answers

check email in jquery as if it were two string

Good evening, I'm finalizing a form check and I caught it at one point, maybe because of the way they wrote my work code I can not use jquery validate , so I have trouble verifying that a input field has an e -mail typed. I made...
asked by 17.04.2017 / 01:08
1
answer

$ .post return 2 values

I have following code: <script> $.post('http://localhost/app/user.php', {acao: acao}, function(retorna){ $("#demo").html(retorna); if(retorna == "sucesso") {faça x} }); </script> However, in user.php...
asked by 11.06.2016 / 01:52
1
answer

Use onclick and ontouchstart

I have this div: <div onclick="funcao('')"> And on Iphone (mainly the 6) the onclick does not run very well. I saw the ideal is to use the ontouchstart , but when I put both of the error, it thinks it was clicked twice. What to do...
asked by 10.06.2016 / 17:47
1
answer

Angular 2 with jQuery

Hey guys, I was wondering if using jquery along with angular2 is recommended, or does angular already have native functions for manipulating the DOM as well as jquery? In my case I wanted a simple task. Just change the height of a div: var...
asked by 05.05.2016 / 07:49
1
answer

Run PHP without refreshing the entire page

My code is this: <?php $buscarusuario=$pdo->prepare("SELECT * FROM top5 WHERE status = 'ativo' ORDER BY colocacao ASC"); $buscarusuario->execute(); // Exibir com Fetch_Obj $linha=$buscarusuario->fetchAll(PDO::FETCH_OBJ); foreach (...
asked by 02.08.2016 / 19:43
1
answer

Inserting holidays into jquery datepicker?

I have a method that changes the datepicker of jquery and inserts some special days (in the case of holidays of the state of RJ), when selecting a holiday, an alert with the day is released, however, it just happens, I wanted to know how block t...
asked by 26.07.2016 / 18:19
3
answers

What's wrong with this code js?

The first part of the code separates the URL into / This is the current URL    www.mydomain.com/category/action var url_atual = decodeURI(window.location.href); var replace_url = url_atual.replace('http://www.meudominio.com/', ''...
asked by 23.12.2016 / 14:10