Posts by Ronny Amarante • 2,544 points
56 posts
-
0
votes4
answers3851
viewsA: Effect when passing the mouse
You can use the property position to achieve this, an example follows:: .team { position: relative; } .team__img { height: auto; width: 100%; } .team__detail { background-color: #000; color: #FFF;…
-
1
votes1
answer98
viewsA: Indentation SASS 2 spaces?
The Editorconfig is a plugin for your editor that allows the preparation of your editor to obey the configuration of your project, thus respecting spacing, tab, new lines and everything else you set…
-
1
votes1
answer69
viewsA: Controllar scroll to go in sections of the site
There are many plugins that do this for you, recommend using the fullPage.js. To use, just use the following code: <div id="fullpage"> <div class="section">Some section</div>…
-
3
votes2
answers17549
viewsA: How to do for when I click button,open link in another window
<a href="#" onClick="window.open('pagina.html','pagename','resizable,height=260,width=370'); return false;">Clique aqui</a><noscript>Você precisa estar com o javascript ativado,…
-
11
votes2
answers933
viewsA: Javascript - How to validate form fields
You can use the jQuery Mask to perform input formatting: The code will look like this: $('.cpf').mask('000.000.000-00', {reverse: true}); $('.date').mask('00/00/0000');…
javascriptanswered Ronny Amarante 2,544 -
1
votes1
answer378
viewsA: Click and show div, click again and hide
You can use the function toggle()jQuery: $(".nav-button").click(function() { $("#nav-links").toggle('slow'); });
-
1
votes2
answers2288
viewsA: Can I use PHP to create dynamic meta tags for SEO?
PHP as a back-end language will deliver the already rendered page to your users and search engines. Resulting in the same content that you would manually play.
-
2
votes1
answer118
viewsA: Best Framework for JSON
There is a Google-maintained Volley library that aims to help HTTP communication implementations. Google provides a documentation page: http://developer.android.com/training/volley/index.html…
-
1
votes2
answers1005
viewsA: Instagram on Wordpress without Login (no password usage)
@Eroder, the Instagram API requires a CLIENT ID and a SECRET CLIENT that are provided at the time you create an application. To create an application, you need to fill in the following form:…
wordpressanswered Ronny Amarante 2,544 -
3
votes2
answers724
viewsA: Popular input with data from the same table via dropdown
<input type="hidden" id="inputdesejado"> <select name="produto" id="produto"> <!-- Isso ira evitar que dispare o change quando carregar. --> <option value="" disable>Escolha…
-
2
votes3
answers29719
viewsA: How to create a button(button) or a link(a) to download a particular file?
I determined a method that will receive the download parameter of a link_to(), this way it would serve for several types. To follow this example I have a file called: javascript_the_good_parts.pdf…
-
6
votes1
answer6100
viewsA: What is the right way to use form-group bootstrap?
The idea is that the .form-group "replace" the .row, being as follows: <form role="form"> <div class="form-group"> <label for="exampleInputEmail1">Email address</label>…
-
1
votes2
answers756
viewsA: setInterval 5 seconds locking browser
Try changing your structure to this one: setInterval($.ajax /*referencia para a funcao ajax*/, 2000, {url: 'suaurl', success: onSuccess, error: onError}/*argumentos passados para o $.ajax*/ ); You…
-
1
votes2
answers4146
viewsA: Plugin that applies zoom when mouse pass
To not make this question based on opinion of which plugin we use, I will show an example: You can use the library Zoom in on Jack Moore, there is a documentation here Source code from my example:…
-
1
votes3
answers1168
viewsA: PHP as per path and filename in variables
Function tabela(): <?php function tabela($var){ error_reporting(E_ERROR | E_PARSE); $globVar = glob($var); $scan_dir = array_diff(scandir($var),array("..",".")); echo "<table>"; echo…
-
1
votes3
answers129
viewsA: Simplify mouseenter and mouseleave of multiple images
Make use of the .children() to pick up the kids from class .navHeader and use of .not() to apply except in what called. $('.navHeader').children().hover( function() {…
-
4
votes2
answers1628
viewsA: How to add Indice to an array
You can add new values using the .push(): series[1].data.push(5) series[1].data 2014-08-01 13:00:41.524[-0.2, 0.8, 5.7, 5]
-
3
votes2
answers13243
viewsA: Rotary Banner with Bootstrap
You can use the .Carousel() of Bootstrap itself, for example: <script> $(document).ready(function(){ $('.carousel').carousel({ interval: 2000 }); }); </script> To help you here is this…
-
2
votes2
answers2443
viewsA: How to print a web page using the backend Rails?
The answer to your question is too complex to be detailed, you need to use a service for managing tasks like the Sidekiq and integrate it with Gem Phantomjs GEM, remembering that for this you will…
-
1
votes3
answers237
viewsA: Apply cascade validation functions
You can control the calling of your functions in the function .submit() jQuery: $( '#send_form' ).submit(function(){ //aqui você poderia adicionar suas funções validadoras. if( name == false ){…
-
0
votes4
answers34147
viewsA: SMTP connection error when sending email using Phpmailer
Change the door to 587 and the connection to ssl <?php header('Content-Type: text/html; charset=UTF-8'); //====================================================================== // CONFIGURAÇÕES…
-
4
votes1
answer768
viewsA: It is possible to create image thumbnails with pure Node.js
Hello, it is possible to create thumbnails through Node.JS, however, it will require a much more advanced knowledge. Currently using external libraries we find the following problems: npm modules…
-
30
votes2
answers36477
viewsA: What is the purpose of the declaration "! Important"?
The purpose the !important is to overlap the Rules of precedence. Example of the operation: HTML <p id="a" class="azul">teste</p> CSS #a{ color: red;} .azul{ color: blue !important;}…
cssanswered Ronny Amarante 2,544 -
1
votes5
answers59481
viewsA: Take content from within a Div and put in Input value
In the case of the form you will use the val() to perform the set and in the div you will use the text() to perform the get. $(document).ready(function(){ $( '.formContato' ).val($(…
-
2
votes2
answers7467
viewsA: Make div close by clicking outside of it
HTML: <li> <a href="#">Click</a> <div>teste</div> </li> CSS: li div{ display:none; } JS: $('li a').click(function(){ $('li div').toggle(); }); $('li…
jqueryanswered Ronny Amarante 2,544 -
5
votes2
answers84
viewsA: Implement this
Just to complement the correct @Diegovieira response, you can also group these events as follows: Tip: $('.nav-a').hide(), use your CSS for this. $( '.categorias' ).on({ mouseenter: function() {…
-
1
votes2
answers971
viewsA: Paint top titlebar of a table with bootstrap
Would that be? HTML: <div class="pull-right" id="tabela4"> <br /> <table class="table table-striped table-ordered table-bordered col-md-4"> <thead > <tr class="paint">…
-
1
votes2
answers2569
viewsA: Upload progress with jquery or php
You can use the jQuery File Upload, it integrates with PHP. Documentation with PHP Session: application js: // This code assumes each file upload has a related DOM node // set as data.context, which…
-
2
votes3
answers318
viewsA: Is referring to an element via its id considered bad?
Window Interface -> window[name] Returns a given element or a collection of elements. As a general rule, relying on this will lead to the brittle code. Which Ids will maintain mapping for this…
-
3
votes2
answers3522
viewsA: Multiple objects in jquery selector
For this use the method .merge()1 var bola = $("#bola"); var casa = $("#casa"); $.merge(bola, casa).css("background-color", "blue"); I’m adding the comment code I put in: To use with two or more…
jqueryanswered Ronny Amarante 2,544 -
14
votes2
answers10462
viewsA: Regular Expression for RG
Friend, here you are, don’t forget to consider who helps you instead of asking other questions and forgetting the answers. Help the whole community! ;) function Rg(v){ v=v.replace(/\D/g,"");…
javascriptanswered Ronny Amarante 2,544 -
1
votes3
answers1752
viewsA: Alert message in Asp.net mvc
I did using the confirm() HTML: <form action="teste.asp"> <button id="save" type="submit">Salvar</button> </form> JS: $( document ).ready(function(){…
-
1
votes2
answers265
viewsA: How to automatically initialize has_many attributes in Rails
Rails has a standardization to popular your database, this standardization serves to maintain the maintenance of your app. I don’t know what your database columns look like, so I’ll post a generic…
-
5
votes1
answer419
viewsA: How to submit all form fields with $.post?
I believe the method serialize() solves the problem: <form id="cadastro"> <input type="text" name="nome"/> <input type="password" name="senha" /> <button…
-
2
votes3
answers1020
viewsA: Good practices with bootstrap grid system
It is normal to use grid within grid, this is how the system works. Example: <div class="col-md-12"> <div class="col-md-6"></div> <div class="col-md-6"></div>…
-
1
votes2
answers300
viewsA: Get link position in a menu using jQuery
Friend, you are passing the content of the href attribute to the jQuery selector, so it cannot locate the element. What’s going on: var getlink = $(this).attr("href"); The getlink variable has in it…
jqueryanswered Ronny Amarante 2,544 -
10
votes3
answers24286
viewsA: What is the difference between <div> and <Section>?
The tag <section> carries with it the semantic responsibility of HTML5, it was developed to represent sections of a document, this is the main idea. Your doubt: The Section element is not a…
html5answered Ronny Amarante 2,544 -
8
votes2
answers3305
viewsA: How to search images in Google with Javascript?
This code is crap, however, it works. I did it quickly because I saw that no one answered your question.. About the Google API, you will make some requests and have some errors, this API is paid…
-
1
votes2
answers529
viewsA: I rotate in my browser Webservice and gives me a strange message
Friend, I noticed that you didn’t even call the methods of your webservice either (hello... or dowork..). Don’t forget the new in your project. Well, I also noticed that you are not referring to the…
-
31
votes2
answers6702
viewsA: Is the ZIP code a unique ID in Brazil?
Let’s go back a bit to the theory of primary keys, we should do some analysis: Basic rules for primary keys: NO TWO occurrences of the same entity with the same content in the Primary Key The…
-
4
votes1
answer1230
viewsA: How to make README.Md multilingual for Github?
There is no way to do this on Github, there is no interpretation for i8n on it. The way you followed is the most correct.
githubanswered Ronny Amarante 2,544 -
0
votes2
answers49
viewsA: Wordpress Folder Permissions - 500 Internal Server
Following the rules of Wordpress, every directory should have: chmod 755 or 750. All files must have: chmod 644 or 640(Except the wp-config.php file, this file should have chmod 600 to avoid…
wordpressanswered Ronny Amarante 2,544 -
2
votes1
answer1496
viewsA: Change pin position of Google Maps
function initialize() { var mapOptions = { zoom: 16, //você pode controlar o Zoom que o mapa iniciará... disableDefaultUI: true, //true = nao mostra os controles padroes(street viewer, botoes: mapa,…
google-mapsanswered Ronny Amarante 2,544 -
5
votes4
answers17158
viewsA: Include another HTML file in an HTML file
The way developers are exploring are generators that do this for you. We have some good ones like the Jekyll and the Middleman. I chose to use Jekyll and it helps me a lot with a language that…
-
7
votes2
answers4228
viewsA: How to clone GIT repository with all branches and tags
When you enter with the command git clone <repositorio>, it automatically downloads the branches along with the tag. You can check using: git branch -r git tag The remote also comes configured…
gitanswered Ronny Amarante 2,544 -
1
votes6
answers14122
viewsA: How to simulate a higher resolution screen to check the behavior of a website?
Try using the Screen Fly, this site allows you to test a site hosted in several resolutions, the cool thing is that it has the resolutions of the devices. This makes it easier, so you know which…
-
1
votes4
answers5885
viewsA: How to smooth the font with CSS in Chrome?
In some cases when this happens, I solve it with this: body { /* CSS3*/ -webkit-text-size-adjust: none; -webkit-font-smoothing: antialiased; }…
-
4
votes5
answers1314
viewsA: PHP connection problem with Mysql
Your hostname has been blocked by Mysql for exceeding the standard of 10 attempts... Open your Mysql console and sign in with: mysql> SET GLOBAL max_connect_errors=10000; Reference:…
-
3
votes3
answers153
viewsA: Include link if first element
Example: http://jsfiddle.net/uASJ9/ I did it this way: $(document).ready(function(){ $( "#menu a:first" ).attr( "href", "http://answall.com" ); });…
-
5
votes4
answers7742
viewsA: How does grid system work?
The grid system works with classes that include a width for their elements. Being from 1 to 12. So 12 is the maximum width of your page. Soon <div class="col-md-12"></div> #Represents a…