Questions tagged as 'javascript'

2
answers

Increase an index to a certain number and then decrease to zero with jquery

How can I make a script in jquery to increase an index by a certain number and then decrease one by one to zero. I'm doing the following to increase but I'd like it to drop to zero by the time it gets to # 5. var index = 0; setInter...
asked by 08.04.2014 / 21:44
2
answers

PDF view in iframe

I already have some time I'm looking for how to view the PDF files in an iframe or a div on the page itself instead of opening it in a new one and using Adobe Reader. But the problem is that the files are not fixed, they come from a code that...
asked by 25.03.2014 / 18:42
1
answer

Draw same javascript object on different canvas

I created a standardized function to speed up the design process in a project that involves multiple canvases.    Thank you for the collaboration of bfavaretto link See the function: (it works correctly) var drawIt = function (canva...
asked by 04.03.2014 / 17:12
3
answers

Responsive Images

I am setting up a blog with responsive design and currently use width:100% to resize images within div . .eMessage>.pimg>img{ width:100%; -webkit-width: 100%; /*Chrome*/ -moz-width: 100%; /*Mozila*/ -ms-width: 100%; /*Intern...
asked by 03.02.2014 / 10:35
1
answer

Regex - Get formatting with no strings around [duplicate]

I'm trying to make a regex to get slack formatting. Eg: *a* = > Take to make bold An initial regex I made was: /\*(.*?)\*/g The problem: Can not have anything around the string (No characters stuck before or after)...
asked by 11.12.2018 / 20:18
2
answers

How to make jQuery Chosen disregard accentuation at the time of the search?

I developed a site that uses jQuery Chosen , and I wish it did not consider accents at the time of the search. For example, I have a list with several names, and I need to look for JOSE (digit without an accent), but I would like it to sho...
asked by 04.02.2014 / 01:22
1
answer

This outside-expected parameter within an anonymous function

I made a code to train Arrays and JavaScript manipulation. Here's part of the code: function Playlist (nome ='Playlist'){ const musicas = []; function addMusicas(...novasMusicas){ novasMusicas.forEach(function(musica){...
asked by 15.12.2018 / 16:00
2
answers

Change the size of a chart with JS

I have the following chart: window.onload = function() { var can = document.getElementById('canvas'), spanProcent = document.getElementById('procent'), c = can.getContext('2d'); var posX = can.width / 2, posY...
asked by 04.01.2019 / 01:37
1
answer

Clicking on an element that triggers the click on another

I have 5 images on my Slide <li><img src="images/slide3.jpg" alt=""></li> <li><img src="images/slide2.jpg" alt=""></li> <li><img src="images/slide5.jpg" alt=""></li> <li&...
asked by 09.11.2014 / 09:14
1
answer

Perform JOIN operations on two data arrays with D3.js

I'm preparing the data for viewing and viewing operations. I use the library D3.js . The data collection is: { "autores" : [ { "id":1, "nome": "Fulano" }, { "id":2, "nome": "Ciclano" } ], "livros" : [ {"id": 1, "autor": 1, "tit...
asked by 12.11.2014 / 15:03