Questions tagged as 'javascript'

2
answers

Is there a way to transform a string as a path? [duplicate]

var sql = { datatypes: { integer: { INT: { mysql: 'INT' }, SMALLINT: { mysql: 'SMALLINT' } } } } // Funciona alert(sql.datatypes.i...
asked by 08.12.2016 / 13:30
1
answer

Identify a long click with jquery

Galera I mounted a context menu that works like this, when the user right-clicks on a 'tr' table it opens. I do this by using jQuery: // Verifica se abre o menu $("tr").mousedown(function (e) { //AQUI FICA AS FUNÇÕES DO MENU }); Well,...
asked by 15.12.2016 / 13:41
2
answers

Javascript prototype: possible to change reference object value?

EDIT: Normally it is in the end, but the question was poorly formulated and I decided to switch to this example, which is much better. Here is an example of a function that does nothing as an Array method: Array.prototype.nada = function () {...
asked by 14.12.2016 / 02:00
1
answer

Problem with JS / Jquery / Ajax

I have a button that when clicked it performs a function: function searchTradeItems() { var uid = $("#useruniqid").val(); var iusername = $("#username").html(); var userid = $("#balmung-id").val(); var itemType = $("#trade-type...
asked by 14.12.2016 / 04:49
1
answer

Asynchronous pagination with laravel

I made a simple pagination with laravel using the ->paginate() return, but as you know, it's not an asynchronous action, which leaves bad paging. I found some examples, but I could not make it work. Does anyone have tips?   ...
asked by 07.12.2016 / 13:36
1
answer

Javascript: ChartJS - How to highlight "piece" of the graph when user clicks?

I'm working with Chart.js and my donut chart is already cute, but I would like that if the user clicks on a part of the graph the "piece" is highlighted ... it can be growing, getting in 3d Has anyone done? As requested, follow the code: cont...
asked by 10.11.2016 / 19:59
2
answers

How to get the link id with jquery

I have a grid and in the last column I will have a link that will be following format: id.1 id.2 id.3 id.4 I would like to click on the link <a id="id."'.$row["id"].' href="#"> Jquery identifies the id so I can call a f...
asked by 21.11.2016 / 23:14
1
answer

How can I view my instagram feed without caption

With this example I'm viewing my feeds only with caption, but when I do not put caption nothing appears. var token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', userid = XXXXXXXXX, num_photos = 10; $.ajax({ url: 'https://api.instagram.com/v1/us...
asked by 07.08.2016 / 20:06
3
answers

Insert character at last cursor position within input

I have the following code: $('#mais').click(function(){ $('#console').val($('#console').val() +"+"); }); $('#menos').click(function(){ $('#console').val($('#console').val() +"-"); }); <script src="https://ajax.googleapis.com...
asked by 22.11.2017 / 00:38
1
answer

How to send data with JS? no page refresh

I'm trying to create an HTML Game and need a way to send data to a database (MYSQL) and would like to know how I can send site data to a server without the page refreshing. If anyone knows some libraries I can use to develop a 2D game in html...
asked by 21.11.2017 / 04:18