Questions tagged as 'javascript'

3
answers

Hide object with JavaScript

I'm trying to hide an object in JavaScript, I'm having difficulties, I tried the command: document.getElementById("form-tab-1").style.display = "none"; But it does not work, I do not know why. The object to be hidden is inside the red c...
asked by 28.08.2016 / 02:36
1
answer

Update link within a variable

I have the following code: // Vegas // $(".bg-fixed").vegas({ // slides: [ // { src: "/img/fundos/slide1.jpg" }, // { src: "/img/fundos/slide2.jpg" }, // { src: "/img/fundos/slide3.jpg" } // ], // overlay:...
asked by 05.07.2016 / 20:50
1
answer

Multiple keys / values in a javascript array

In a certain part of my code I need to make a request using javascript with several identical ids. The problem is that it is overwriting the ids with the last one selected. My Html: <button class="btn btn-default border-none" v-on:cli...
asked by 06.10.2016 / 16:26
1
answer

Join controllers

I have this controller that sends a normal Error or Success notification $scope.add = function () { if(!$scope.name || !$scope.url ){ $scope.success = null; return $scope.error = 'Preencha todos os campos.'...
asked by 05.10.2016 / 21:47
1
answer

Retrieve JSON values and assemble HTML for each record

I'm having doubts about how to structure a JQuery that should append an HTML code to each of the items a JSON returns me. My question is how to retrieve each of the JSON values and do a repeat structure to create the HTML that will eventu...
asked by 06.10.2016 / 17:38
1
answer

Create the same function in php

I have the following function in javaScript : function teste(ctrl) { var str = ctrl.value; var str = str.split(" "); if (str.every(isBigEnough) && str.length >= 2) { alert(true); } else { alert(fals...
asked by 07.10.2016 / 20:57
1
answer

Is it possible to pass text (json) via client socket to client with javascript?

Send data via socket, from one client to another, only with javascript? Preferably, in pure js. Yes, Sergio. Without the server.     
asked by 05.10.2016 / 23:06
1
answer

Using libs as jQuery negatively influences the performance / loading time of a page? [duplicate]

I say because it uses a lot of methods ... Does this influence page loading? Well, I heard that the ranking of search engines takes into account the loading time of the site. So a well-done "pure languages" system, without frameworks, would...
asked by 06.10.2016 / 01:02
3
answers

facebook style button

How to create a favorite button like facebook style that after clicking is marked and sends the request to the database in the background, something like this: Thefirstbuttonisthenormalstateandthesecondisafterbeingclickedandinsertedintotheda...
asked by 27.06.2016 / 18:58
1
answer

Which way to use reverse (); in a given id element

I have in the HTML document a certain element that has ordinal numbers 0-9. I'm trying to use the reverse(); method to invert the order of numbers in my element. The logic should be: 1- capturing the output of the element id...
asked by 28.06.2016 / 00:34