Questions tagged as 'javascript'

1
answer

Create indexes dynamically with javascript

Good morning, gentlemen, I'm creating a system of contracts and I have a question about how to come up with a certain idea. Because the contract works by clocks and paragraphs, I need to add indexes dynamically. The idea would look like...
asked by 24.07.2015 / 15:31
1
answer

How do I migrate my website to RequireJS?

Currently I concatenate all my javascripts with grunt I send the mined file to the page, but I know a best practice is to use RequireJS to muddle everything, but I do not know how to migrate my Javascript files from "normal" to "modules ". :   ...
asked by 24.07.2015 / 20:38
1
answer

Control User Agent to call iFrame

Good morning !! I was doing some things here and decided to put an iFrame on the page, but it was loaded with the User Agent from some other browser. Just to understand the behavior of the site. Is this possible with HTML5 and Javascript?...
asked by 27.07.2015 / 13:06
1
answer

Centering div on an image

In a project I have an image that when the mouse is at the top starts an effect on a div that is over the image, my problem is that often the div is not centered, because the image has a dynamic size , and I have no more ideas on how to fix this...
asked by 08.02.2016 / 12:23
1
answer

Block 'body scroll' when the LightBox is open, but you can scroll the contents of the LightBox

Forgive me if I'm wrong, because I do not know the exact name of the effect I'm looking for, I've seen such an effect on some pages over the Internet but at the moment I do not have any links that I can use as an example. As described in the...
asked by 08.02.2016 / 01:26
1
answer

Character counter returning to the default value

Galera, I have the following problem, I put this expression in JAVASCRIPT, it captures the amount of characters I typed and subtracts with MAXLENGTH, it works however I am using JSON (not to post on the page), when I click the Add characte...
asked by 19.11.2015 / 18:35
1
answer

Open link in new tab without using HTML target="_ blank"

Scenery I'm optimizing a page where about 200 partner images are displayed (very small does not require paging), these images are wrapped in a <a> tag, and all partner sites open in new tab ( target="_blank" ). Obs: I saw...
asked by 21.07.2015 / 17:03
1
answer

Next Back content on page

In this table there are the rounds, where it all appears, I wanted a forward and back button and the guy could see the next rounds, without having to scroll the whole screen, wanted to appear only the round in question and each forward and bac...
asked by 17.07.2015 / 16:19
1
answer

Mask - javascript Mask

I was transcribing some functions that I have in PHP for javascript. How could I make this code more efficient? String.prototype.substrCount = function(str){ if(str == undefined){ return 0; } var r = new RegExp(str, 'g');...
asked by 25.09.2015 / 15:04
1
answer

Alert works and sweetalert not [closed]

I'm trying to use sweetalert to give a "Submitted" alert. if($rstSql["cod_erro"] == 0) { echo '<script> swal("Good job!", "You clicked the button!", "success"); <script>'; } else { echo '<script>alert("message2"...
asked by 22.09.2015 / 19:51