Posts by Chun • 7,440 points
183 posts
-
1
votes2
answers286
views -
2
votes1
answer55
viewsA: I cannot Put background-color and Outline
You’re not "filling" the space above the title because of Default Browser Styles. You cannot apply styles to list items because the selector is typographically wrong instead of ordena is orderna in…
-
2
votes2
answers226
viewsA: How to create a tabs menu like Stack Overflow
Your question is a little vague and difficult to understand what you are really trying to do, so you can give a concrete answer and adapt the code in the best way. However I will post here a concept…
-
2
votes1
answer849
viewsA: Why even with margin 0 and padding 0 there is still space between the elements?
This is just the way the elements inline-block behave. These spacings are the same as spacing between words. If we put the elements all together (words all together) we will have no space between…
-
2
votes2
answers8065
viewsA: How to make the background image transparent - image?
The trick here is to create a new element just to handle the background image as follows: body { background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4)); font-family: 'PT Sans',…
-
3
votes1
answer11293
viewsA: How to hide the iframe scrollbar?
If the plan here is to disable the ability to scroll on iframe, use the attribute scrolling="no" which is supported in HTML4, along with the property overflow to support HTML5: #frame-spec{…
-
1
votes1
answer404
viewsA: How to pause youtube videos when a new video is played?
To automatically pause a video you have to use the API of Youtube instead of the default iframe. This API allows you to control simple things like events play state, pause, stop etc, or go to the…
-
2
votes1
answer6485
viewsA: How to change the image when mouse over
To change the source from an image to a new source is required to use Javascript: var x = document.querySelectorAll('.servicos .col-md-3'); var novaImg = 'https://lorempixel.com/400/100/sports/5';…
-
1
votes3
answers2367
viewsA: Transparent menu with color change when moving the mouse
As @Davidsamm said, just don’t assign a background color to the target element, and then scroll to set it a color. var el = document.getElementById('menu'); // elemento alvo var numPx = '250'; //…
-
1
votes1
answer495
viewsA: Element event created after DOM loading
Version with pure Javascript: First we create this small function that will separate the classes of the element individually if it has multiple classes using the .split(), then using the .indexOf()…
-
3
votes1
answer194
viewsA: add input in time format
This happens because the account is being made backwards. Should be segsai (hora saída) which is the higher value, less segent (hora entrada) which will be the lower value. var calc =…
-
1
votes1
answer131
viewsA: How not to affect next elements of the same tag
As our friend @Bsalvo said, add concrete classes to the elements you want to add the desired styles: .breadcrumb .bread-li { /* estilos aqui */ } .breadcrumb .bread-li.active .bread-link { /*…
-
2
votes1
answer1265
viewsA: Delete dynamic table row via button in dialog box
For that you have to add one Trigger to the button YES of the modal that will launch the function to eliminate what you want, which in this case will be the line (td) entire table. I would also…
-
1
votes2
answers2600
viewsA: How to make a responsive image with CSS?
That’s because the value width of div Parent/wrapper is set to a fixed value of width: 885px;, then at low resolutions this size will always be the same. When you should be doing the same as you did…
-
0
votes1
answer71
viewsA: Real-time search saving server?
Creates a function on click instead of keyup and so the query will only be made when the user finishes typing and click a button, or click enter to advance the search. $(document).ready(function() {…
-
1
votes1
answer349
viewsA: Make code only work on Desktop
If the case depends on screen size, you can just do: if ($(window).width() > 960) { alert('ecrã é maior que 960'); } If the case really depends on being a desktop browser or not, you can do it…
-
0
votes2
answers320
viewsA: Animation in CSS is executed but when it starts again it does not repeat
The animation wasn’t repeating because you were declaring the animation-iteration-count: infinite; in a class that does not exist, that was the class - .slidein. The animation should be pointing to…
-
8
votes2
answers314
viewsA: Is there any difference between clip and overflow property?
The prowess clip:; allows you to specify a rectangle to crop an absolutely positioned element. The rectangle is specified in four coordinates, all starting from the top left corner of the element to…
-
1
votes2
answers325
viewsA: Jquery - Best way to select the same element
I won’t be overloading the browser by calling several times the same element in Jquery? Not necessarily, depending on the complexity of the project, in this particular case I think it is unnecessary…
-
3
votes1
answer19768
views -
1
votes1
answer73
viewsA: href does not execute jQuery and Function
I noticed you were pointing a .last() for a id in the first line of your code, which most certainly should be the reason why the code is not running. id's are to be used only once in the DOM. To…
-
0
votes1
answer120
viewsA: how to align 6 Articles elements in two rows?
You can do this by making the size of the elements child either 50% from a certain point using media queries, or you can do this already by implementing directly into the element by giving a…
-
1
votes1
answer1139
viewsA: Use <map> tag in a responsive image
It is necessary to use the jQuery bitlioteca (such as Google) for the plugin to work. Then you can add the referenced mapping library of the Github Enter the two libraries before the tag closes…
-
4
votes1
answer276
viewsQ: How to control the thickness/thickness of the tag 'strike, del, s', the famous line above the text
Today I was developing a project and I reached a point that for the first time in my life I decided to make use of the tag <strike> html. I don’t know if it was the font style I was using, but…
-
2
votes1
answer276
viewsA: How to control the thickness/thickness of the tag 'strike, del, s', the famous line above the text
Here is an alternative solution for tag usage <strike>, <del> or <s>more malleable and that gives us more control not only for the thickness of the line but also for the color of…
-
2
votes1
answer364
viewsA: How do I click an image and it is selected?
You can do this by adding a new class ativo each time an image is clicked: $(function() { $('.img-thumbnail').on('click', function() { var $imgSelected = $(this).attr("data-selected")…
-
0
votes3
answers939
viewsA: Javascript set value in Modal Bootstrap
I don’t see where that variable is being set in your code. But if what you’re trying to do is take the value of a string and add it to the DOM, you can do it this way: var resultado = '464866';…
-
1
votes1
answer249
viewsA: ':Hover' effect with 'Transform' shows a defect in Google Chrome when exiting ':Hover'
This is because during the transition (transition) the elements child are not "masked". But at the end of the transition, the situation already becomes OK again. This is a known bug in Webkit-based…
-
2
votes2
answers573
viewsA: Change image according to screen resolution
Yes, it is possible! You can do it using the method .width() Description: THE .width() gets the current width calculated for the first element in the set of corresponding elements pointed. In this…
-
2
votes1
answer318
viewsA: How to clean/reset bootstrap fileinput after selecting new image?
Sometimes we’re so focused on "focus the image closely when we should be focusing from afar". I think it was just a lack of attention in the code. If you look closely you have an option for this…
-
1
votes1
answer475
viewsA: Firebase - Print records in descending order
The problem is that there were "loose ends" in the code such as the lack of some arguments ) in jQuery code and you also had a typo that was on the line…
-
3
votes2
answers7745
viewsA: How to check if an element has a class, or is with an "active" class
To do this you can use the method .hasClass() jQuery as follows: if ($(".menu").hasClass("menu-active")) { // Faz algo aqui } Here is an example below: if ($(".menu").hasClass("menu-active")) {…
-
5
votes2
answers1838
viewsA: How to force the favicon.ico update?
To force the update of favicon, use a query string in your file name. For example: <link rel="icon" href="http://www.seusite.com/favicon.ico?v=2" /> This forces browsers to download the new…
-
1
votes1
answer257
viewsA: CSS Display image in certain scroll position "Y"
If using jQuery is an option, you can do it as follows using the event .scroll(): $(window).scroll(function() { if($(window).scrollTop() + $(window).height() == $(document).height()) {…
-
0
votes1
answer178
viewsA: Layout of text box
I tried to organize the code differently - I removed id's e susbsituí por classes with the thought that these "User Cards" will be used in more places, and I also tried to somehow minimize the code.…
-
4
votes1
answer121
viewsQ: How to use '.each()' in a variable to get multiple '.attr()' from a list?
I’m starting to develop a video gallery that I’m going to do upload for Github for anyone who wants to download and use it. I have a list as follows: <ul> <li><span class="everyVideo…
-
6
votes1
answer6033
viewsA: Show/Hide div using a radio button
You weren’t far from getting the code to work. Instead of pointing to the class .FlgPontua, you have to point to the name="FlgPontua". $('input[name="FlgPontua"]').change(function () { if…
-
1
votes1
answer794
viewsA: Adding HTML to the Integrated Store Footer
Points of attention and possible improvements: The email has several spaces before the text itself that conflict with how the code works, so it’s not working. But this is solved by eliminating all…
-
3
votes1
answer54
viewsA: Hide H4 without link and show H4 with link
You can do this with just one line of code using the .has() to detect whether the element h4 has a link/tag (<a>), and leave it hidden already previously with a display:none; in the CSS code…
-
2
votes3
answers398
viewsA: Declare Css for multiple identifiers
If you are not using the class .item nowhere else, the recommended would be to point the styles directly to the class .item. However, if you are using it in multiple places, "hack" simpler would be…
-
1
votes1
answer333
viewsA: Problem with line breaking JS
For the line to break it is necessary to use the property word-wrap: break-word; in its CSS code as follows: .result { word-wrap: break-word; } More information about this property on: CSS3…
-
1
votes2
answers773
viewsA: Scroll according to Section ID
It already does this automatically if you use id's instead of classes for each section. These are called anchor links! Here’s an example below: More information on how anchor links work: w3Schools -…
-
0
votes1
answer105
viewsA: How to run a Rigger after another Rigger
You can use the click() to point to the first click and then trigger the second click using the trigger(): $("#target").click(function() { $( "#segundoElemento" ).trigger("click"); }); Actually, I…
-
4
votes2
answers937
viewsA: How to remove CSS and Javascript blocking files in Blogger, such as Widgets.js?
These files are automatically implemented by Blogger, not the template, so in the template you won’t find where they are being generated. Removing these files can improve the loading speed of your…
-
2
votes3
answers63
viewsA: Javascript send an account to an element
It is necessary to use Math to make this calculation, other than the number 3 will just be added to the front of the value we are getting from the first div to make his output to a second div. That…
javascriptanswered Chun 7,440 -
2
votes2
answers484
viewsA: Why isn’t my footer staying on the full screen?
The Fastest and Shortest Solution: Fastest and dirty solution to solve this, would be to apply a position:absolute;(read about positions), at the footer. However I am not 100% sure that it will…
-
4
votes1
answer1464
viewsA: Style input type file
The trick is to do the input file invisible, with opacity: 0 !important; and behind it to create a button div custom/stylized the way we want the button to look (in this case we will try to create…
-
1
votes2
answers2182
viewsA: How to change the color of the link when you are on the link page accessed
If you’re building a website with static pages, in HTML for example, the best way to do that is to add a class - linkAtivo for example, in the navigation link corresponding to each designated page…
-
2
votes1
answer811
viewsA: Div from right to left with javascript
If using jQuery is an option, you can do it as follows: $('.callMenu').click(function() { $('.navBar').toggleClass('slideMenu'); }); body {background-color: #fff;} .callMenu { padding: 10px;…
javascriptanswered Chun 7,440 -
1
votes1
answer132
viewsQ: How to preserve Mozilla Firefox Browser Console Log?
In the Google Chrome browser, in the tab consola, there is an option for preservar log while we are testing things or developing our website so that we don’t have to rewrite the whole code again if…