Posts by Bsalvo • 1,818 points
75 posts
-
1
votes1
answer37
viewsA: JS conditional checkbox form
Val is extremely unnecessary for your case, and should not be used anywhere. you do not need a function for each checkbox, if you had 40 checkbox, would rewrite your code 40 times, is not ideal…
-
1
votes2
answers63
viewsA: Is there a possibility of knowing when a field bursts width?
You must define a max-width pro element, and define the width for fit-content in css. Then you must create a function that will check whether the widthof the element is equal to its max-width, and…
-
0
votes0
answers44
viewsQ: mysqli_query returns empty column
I have a query that has the function of returning columns of 2 tables. SELECT * FROM `Estoque` AS E JOIN `Produtos` AS P ON E.id_produto = P.id_produto When this query is executed within phpmyadmin…
-
1
votes2
answers327
viewsA: Javascript run one click at a time
Our colleague Luiz Felipe already presented a solution to the problem, but as we are here to share ideas so let’s go! HTML 5 allows us to add new customizable attributes to any element on the page.…
-
0
votes1
answer41
viewsA: Jquery applies css style only the last time it runs
Well, as discussed with our more experienced colleagues, FOR which encompassed the completed AJAX request to fulfill its function before all requests return the information required for the style…
-
0
votes1
answer41
viewsQ: Jquery applies css style only the last time it runs
Hello. I have a table with information that will be entered in the database, making a request line by line. Let’s take the image as an example: If I want to register in the bank these 5 rows of the…
-
1
votes1
answer159
viewsA: Passphrase with Javascript
Is it only necessary to use javascript? The HTML solve this for you. <marquee>Essa frase ta andando, se liga...</marquee>…
-
1
votes2
answers389
viewsA: SESSION or COOKIE in Virtual Store
Why you do not use the bank and cookies or Session? Using the bank you are able to know if the user abandoned the cart today at 14:34 or if abandoned 456 days ago. Having control over trolley…
-
4
votes1
answer196
viewsA: Console shows javascript log very fast and not time view output
To keep the console on Google Chrome you must follow the following steps: Squeeze F12 on your keyboard to open developer tools. On the tab Console there is a small gear on the right side, click on…
-
6
votes3
answers158
viewsA: Css3 stop after finishing rotation?
Use jQuery to make the element hover do not go back to its originality when the mouse comes out of the top: Reading some comments, let’s go to the editions! $('.openn').hover(function(){…
-
0
votes1
answer30
viewsA: How to implement a "Liener" in a video?
There is a property of HTML 5 videos that is able to detect whether or not the video is over. I think a few lines of code are needed //caso o vídeo tenha acabado o retorno é true, caso não será…
-
0
votes2
answers248
viewsA: Text overflow in jQuery modal and Bootstrap
Well, I’ve developed a way for your doubt to be resolved. I did not do in a modal because I think there is no need for so much implementation. What is necessary for functioning is in the code! I’m…
-
1
votes1
answer1278
viewsA: css Hover in a table with rowspan
Using Jquery: Add in your <tr> the same class representing the content line. Done this Jquery will capture the event of hovering over the <tr> after this you will get the class of the…
-
1
votes1
answer156
viewsA: Input added with . append() does not send POST data
The problem can be solved simply. Jquery takes and stores all elements of the page at the moment it is loaded, so when we create a new element dynamically it does not exist in the stored memory of…
-
1
votes2
answers254
viewsA: Assign a variable the value of a click on an image, to make a comparison
You can add the attribute name with a certain value your images or div that belong to Example Click the words to set the variable. $('div').on('click', function(){ var escolha =…
-
1
votes1
answer42
viewsA: Apply CSS to URL
Well, let’s try to solve it in an easy way ok? I believe that this /beginning be the main page of your correct website? So you have created an instruction that detects whether or not it is the main…
-
1
votes3
answers1550
viewsA: Jquery - Color HTML element border
Colleagues have already submitted answers that will work if you implement them. However I made the code a little more belonging to the universe of your question: There are two input type='date' the…
-
1
votes2
answers1889
viewsA: Overlay CSS image
I need to place this image with number 360 inside the image which is a circle, what is the most correct way to do this? Well, looking at the code you provided, I see that the idea is to literally…
-
1
votes4
answers635
viewsA: I want to subtract elements from an array in JS, but that returns several results
Just use a for which traverses the size of the vector and subtract the position i+1 by the position i var arrayExemplo = [2, 5, 9, 10, 15]; var novoArray = []; for(i = 0; i <…
javascriptanswered Bsalvo 1,818 -
6
votes5
answers357
viewsA: How to dim the blue light on a website?
The blue light mentioned in the question is a light emitted by the viewers of tablets, mobile phones and monitors, and even disturbs because it is able to scare away sleep (you know when you are…
-
3
votes1
answer206
viewsQ: Reverse CSS3 transition effect
I wonder how I can reverse the transition effect of elements with CSS3 $('span').on('click', function(){ if($(this).text() == 'Mostrar Efeito') { $('div').css('max-height', '250px');…
-
1
votes1
answer100
viewsA: Limit a "range" using another "range"
Good using your comment I have 2 two "range" the two go from 0 to 10, but I need that when one is in 5 the other was limited to a maximum of 5 I developed an answer that uses Jquery and satisfies…
-
2
votes0
answers322
viewsQ: Canvas loses quality while saving video frame
I’m using a function that captures a frame of the video to later define it as thumbnail. function thumbnail() { var canvas = document.getElementById('thumb');…
-
2
votes2
answers424
viewsQ: move_uploaded_file only works once in the file
I’m using the function move_uploaded_file The first time I use it, I send a certain video to a temporary folder. 1 move_uploaded_file($_FILES['cadVideo']['tmp_name'], "temporario/" .…
-
2
votes4
answers905
viewsA: Changing the background of a table
I don’t know if I got it right, but I think you’re putting together the layout of your site through tables? If that is the case I advise you not to continue in this way, we use the concept that…
-
1
votes2
answers48
viewsA: Return one of the functions in jquery.
You can call the function by passing a certain parameter, so there is no need to create more than one function to call the functions. function psNF(opcao) { if (opcao == 1) { var pergunta =…
-
1
votes2
answers1013
viewsA: Add Favicon to my website
You need to add favicon to your page What is favicon? (Wikipedia) Favicons are small images (typically 16 by 16 pixels) that are saved on the website for viewing by the browser. Usually are used as…
-
11
votes5
answers8294
viewsA: Count characters while typing
When accounting for the length of the word the final value also counts the spaces. Now no longer: var espaco = 0; $('#nome').focus(); $('#nome').keyup(function(e) { if (e.keyCode == 8 || e.keyCode…
-
0
votes1
answer34
viewsA: Help with Div handling
There is a style called border-radius, how can you control the such "curve" mentioned by you. you can manipulate the top,right,left and bottom of the object. Example div{ width: 120px; height: 90px;…
-
1
votes1
answer2509
viewsA: How to change the font size of select options?
You can add the tag <optgroup> optgroup { font-size:35px !important; } <form> <select> <optgroup> <option selected="selected">Escolha a cidade</option> <option…
-
1
votes1
answer32
viewsA: My select does not resize to the font size. How to resolve?
Set height on your select: figure.cx-fotos-portugal form select{ font-size: 35px; padding: 5px; border: 1px solid #b9bdc1; color: #797979; height: 70px; }…
-
1
votes3
answers1154
viewsA: How to scale aside and div center according to screen height
To keep the div until the end of the page just add in the given element. .elemento { height: 100vh; }
-
0
votes1
answer388
viewsA: Start css animation in div only after opening menu
In a simple way, you can solve this problem using Jquery. What must be done: You must create two classes: 1º - The class in which the object will be before from the menu be clicked. 2º - The class…
-
1
votes1
answer86
viewsA: How to create a 2d animation like a video, vignette or cutscene
Marcio, I believe you have the knowledge to do what you’re saying right? Just to be a complex animation we have already taken it from there that you must have a base in js and the like or (is in a…
-
2
votes1
answer423
viewsA: How to start a function with onclick?
Matheus, you need to create an element that will be clicked to call the function. <div id='lerLog'>Ao clicar aqui a leitura do log acontecerá</div> Great! Done this put the function this…
-
0
votes2
answers51
viewsA: Image is not centering
If the class .logo2 is the attempt to center the image can delete it. Add in your css the following style to the tag <img> img{ width:100%; } Note: If this image is an attempt to make a menu,…
-
1
votes1
answer151
viewsA: Place Items in Scroll
It is impossible to use your available code so I created a simple example for you to understand. The problem you are having can be easily solved as style white-space: nowrap;, Exactly what he does…
-
1
votes2
answers1649
viewsA: Name over image when mouse passes css
Basic example with a few changes taken from the site W3 Schools In class .text you have the option to change the color, font, size and apply any style you find necessary. .text { color: #008CBA; //…
-
2
votes4
answers804
viewsA: How to change font in textarea using javascript?
Using Jquery: $('textarea').css('font-family', 'Arial'); Example: $('div').on('click', function(){ $('textarea').css('font-family', 'Arial'); }); <script…
javascriptanswered Bsalvo 1,818 -
2
votes2
answers1683
viewsA: Place text at the bottom of the css circle
Just add the property line-height in class .text and decrease the margin-left class .circle <style> .circle{ height: 37px; line-height: 37px; position: absolute; background: white;…
-
3
votes2
answers939
viewsA: Check if URL is different in PHP
You can use the super global $_SERVER $server = $_SERVER['SERVER_NAME']; $endereco = $_SERVER ['REQUEST_URI']; $clienteLogado = $this->helper('customer')->isLoggedIn(); $urlCadastro =…
-
1
votes1
answer478
viewsA: Div with same image height in Bootstrap
What has been done I added a new class adapta on all 4 elements (panel 1, panel 2, panel 3, panel 4). This way it is possible to manipulate all at the same time using Jquery. I created the function…
-
2
votes1
answer58
viewsA: How to make the IMG tag display the image with real dimensions and responsiveness?
Do it this way. .guialistar img{ float: left; } When we don’t define any width for the tag img the image is loaded and displayed in its original dimensions. remember to update the browser with…
-
1
votes1
answer236
viewsA: how to replicate dynamic table
Come on. var copia; function loadEditLabel() { // Salva o novo input saindo do campo ou apertando enter $('[contenteditable="true"]').focus().select().keydown(function(event) { if (event.key ==…
-
2
votes1
answer898
viewsA: How do I fade in the page load?
Create a file .css in your project folder and add this code. I like to save as efeitofade.css @keyframes fadein { from { opacity: 0.3; } to { opacity: 1; } /* Padrão */ } @-moz-keyframes fadein {…
-
0
votes3
answers1798
viewsA: Make Bootstrap columns fill 100% of the Row width
I believe that there is no need to make the column fill the Row 100%, but as I have already commented on this in the question, let’s move on. What has been done: HTML I added id for each div of…
-
0
votes2
answers229
viewsA: JS and HTML DIV - TAB KEY
Come on, the code below detects when a certain keyboard key has been clicked. e.keycode == 13 This line is saying that when the key enter is clicked, the function below will be executed. Because…
-
5
votes2
answers413
viewsA: Border of different colors
Manipulate borders with css: When adding borders to your page elements, you have the option to individually manipulate each segment of that edge (top,right,left,bottom). Manipulating the top and…
-
3
votes3
answers1225
viewsA: How to distribute images horizontally equally within a Section element?
Come on, section.destaquestutisticos{ float: left; width: 100%; max-width: 1200px; height: auto; margin-top: 10px; border: 2px #FF8922 solid; box-sizing: border-box; text-align: center; }…
-
2
votes1
answer24
viewsA: Values are going empty in Jquery
<script type="text/javascript"> $(document).ready(function(){ $('#login-form').submit(function() { data = $('#login-form').serialize(); $.post("validar.php", { d: data, }, function (d) {…