Posts by LeAndrade • 8,475 points
404 posts
-
1
votes1
answer282
viewsA: How to take individual td values from dynamic table without clicking on the row
I don’t know if the way your code is implemented, it will perform well, but if you want you can take the values of each td just setting your position from the attributes date.…
-
7
votes2
answers1406
viewsQ: Difference in font-Weight Bold/Bolder application
I would like to know the difference in the use of CSS properties font-Weight:Bold and font-Weight:Bolder, because applying these properties I can not see difference between one and the other so as…
-
1
votes2
answers1675
viewsA: Tooltip Bootstrap 4 does not work
Make sure you have declared all the necessary files, in the example I am using the Bootstrap 4 and its files and the latest version of Datatable: $(function() {…
-
0
votes1
answer118
viewsA: How to save the value in a global variable created outside the function scope
You can declare the variable media globally ie outside the scope of existing functions on the page, to be well taught and reuse it in any other script location and even other scripts. A good…
javascriptanswered LeAndrade 8,475 -
0
votes1
answer44
viewsA: Problem loading global attributes (date-*) with jQuery
It’s cool that you’re learning, it’s normal when we’re learning something to do some confusion, for example: 1 - You do not need to declare several times within the same scope $(document), because…
-
3
votes4
answers1217
viewsA: Multiple choice question
I think the best thing would be to use radio and use a if/else and take the two answers that are right: $("input[name=questao]").on("click", function() { var value = $(this).val(); if(value == 'A'…
-
1
votes1
answer98
viewsA: How to concatenate serialized data from a form to the javascript string?
Just take the result of the serialized variable and concatenate with the existing one: $(document).ready(function(){ $("button").click(function(){ var dados = $("form").serialize(); var x = "2222";…
-
1
votes1
answer69
viewsA: Call JS loading Toolbar in place it shouldn’t - SUMMERNOTE
Guto see my example how it works correctly as you wish, see if there is none CSS itself affecting summernote’s Css: $(function() { $('.summernote').summernote({ disableDragAndDrop: true, shortcuts:…
-
2
votes2
answers571
viewsA: How to make Bootstrap Grid stay with 2 rows in Mobile
Using the classes col-Xs-... which means extra small you can determine how to render the elements on the screen. If you wanted an element to occupy the entire screen in the Xs resolution, you would…
-
0
votes2
answers2081
viewsA: Change the color of the Nav bootstrap 4 link
If you want a custom color you can do as you did, remembering that it has the class text, as text-success(verde),text-Danger(red)` and so on with standard Bootstrap colors: <link rel="stylesheet"…
-
2
votes1
answer33
viewsA: Press 3 box at a time by clicking the button
You can do it using the method eq() always setting 0, because every time it is searched in HTML the class .box-hidden, always returns the first (0) element: $(".box-hidden").slice(0, 3).show();…
-
2
votes2
answers621
viewsA: Put bar in Bootstrap menu
You can create the bar with a span for example and style it until you get the expected result: .linha-vertical { border-left: 2px solid; box-sizing: border-box; margin: 10px 10px 0 10px; height:…
-
0
votes2
answers169
viewsA: Animation with Javascript/jQuery
I made an example following your idea of dragging, not knowing which application environment, whether it is mobile or web. If it were web I would apply the effect with Hover, but there remains an…
-
0
votes2
answers107
viewsA: How to clear multiple input fields by classes?
I don’t understand why you used the method not(), because if you want to clear the fields with the classes, if you put not() you will do exactly the opposite. You can call as many classes as you…
-
0
votes1
answer42
viewsA: How to change page when finishing an animation?
Face absolutely nothing that has there in your JS is necessary, the animation is all made with CSS, then just wait for the animation to finish its time and load another URL: $(function() {…
-
2
votes3
answers198
viewsA: Change link text without id or class
Gustavo you can do this in several ways, through jquery selectors $(function() { $('a:eq(0)').text('fulano'); // pega a tag 0 do documento $('a:eq(1)').text('ciclano'); // pega a tag 1 do documento…
-
2
votes1
answer103
viewsA: Placing Javascript in Div
From what I understand you don’t have much knowledge of Javascript, then follows some considerations: 1- You are using Document.write which is not indicated because it overwrites all its HTML. 2-…
-
1
votes3
answers176
viewsA: Keywords with Jquery
If you are using jQuery, one that I have already used and is very easy to use is the bootstrap tags input. OBS: it works only until the Bootstrap version 3.3.7 $("input").tagsinput('items') <link…
-
1
votes3
answers104
viewsA: Option appearing in text area separated by commas/lines
Hello Wellington I made an example for you, but your code has some points I listed: 1- You are calling the functions in such a wrong way onchange="calculaValor()" , "C()", when the right thing is so…
-
5
votes5
answers1237
viewsA: What is the difference between substr and substring?
Just one more example to leave registered here on the site: let texto = 'Testando JAVASCRIPT'; let texSu = texto.substring(9,19); // pega a string a partir do 9º caractere até o 18º caractere mais…
-
0
votes1
answer56
viewsA: Detect Print Popup Opening or a Dowload
Christian I confess that I don’t quite understand what you want to do, but I left an example for you to see how you can perform an action before printing using the native javascript method…
-
4
votes5
answers869
viewsA: Fill <text> inputs after check <checkbox> and clear when unchecking
Just one more way to do it: $(function() { var check = $('#anonimo'); check.on('click', function() { if(check.prop('checked') == true) { $('#nome,#email,#telefone').val('anônimo'); } else…
-
3
votes1
answer46
viewsQ: Doubt about getter in Javascript
I saw studying about computed properties of Vues.js that these computed properties use getters and setters also, and studying on the get I fell into this example code on the Mozilla: var expr =…
javascriptasked LeAndrade 8,475 -
0
votes1
answer52
viewsQ: Question with logic to select div
I have the following problem, when I click on a div the same should be with the background-color black and the color of the color that really is the background, until then it is working normally,…
-
1
votes1
answer41
viewsA: Responsive Diamond Grid
Very simple Lincoln, in his code JS you are calling the Diamond grid in an element with id equal diamond-grid but in your HTML you have no element with id but a class diamond-grid, then change this:…
-
0
votes2
answers855
viewsA: How to change Popover size in Bootstrap 3?
You can increase not only the width from Popover like any other Css property of it normally: $(function() { $('[data-toggle="popover"]').popover({html: true}) }) .popover-content { color: red;…
-
2
votes3
answers54
viewsQ: Use of property Nth:Child()
I would like to know whether it is possible to leave the colours consecutively BLUE, PINK and YELLOW, tried using Nth:Child but I did not quite understand how to do it, because it left in the…
-
1
votes2
answers56
viewsA: Nav doesn’t float right
You probably put the float: right in the wrong place, see working in the example below: .container{ width: 100%; height: 100%; overflow-x: hidden; } body{ font-family: Verdana, Geneva, Tahoma,…
-
2
votes2
answers335
viewsA: How to insert space in Camelcase string?
I made an example to implement in your code: var regx1 = text.match(/[A-Z]/gm)[1]: On this line I take the second occurrence of capital letter V. text = text.replace(regx1,' '+regx1): On this line I…
-
1
votes1
answer332
views -
1
votes2
answers260
viewsA: Why does Vue.js lose formatting when adding dynamic items? Is it possible to fix this?
The Vue does not lose formatting of items added dynamically, however there are some important considerations that are necessary to do with respect to your code: 1- Is highly 'contraindicated' the…
-
1
votes3
answers51
viewsA: Add class and link to a LI tag
You did not specify how you want the class and link to be added, so I simulated to the button click the addition of the same: var next = document.getElementsByTagName('a')[0]; var back =…
-
0
votes1
answer41
viewsA: More than one value in an id variable
Cara, I don’t know if I understand your question very well, but if you just check the checkbox when selecting the options TRANSPARENT, MATTE and METALIZED in select you can do so:…
-
1
votes2
answers1466
viewsA: How to select options from a select dynamically populated by Vue.js?
Only for purposes of leaving registered here on the website for inquiries on future issues. As the @bfavaretto mentioned just put the v-model in select and property data set the elements you want to…
-
0
votes1
answer61
viewsA: Jquery script only works after page re-load
Guy your code works normal, and it is not running only after the page Reload no. I also removed the line $('.list'). each(Function(index) that does nothing. $(document).ready(function() { var topli…
-
1
votes1
answer71
viewsA: Disable download link while downloading
Yes this is perfectly possible, note my sample code. I made a function in Javascript that by clicking on the link a, the same 'lose' attribute href and after the count that in his case would be the…
-
1
votes3
answers873
viewsA: Key modal Event
Your question has gotten a bit confused, I don’t know if the solution you want is with jQuery or with Vue. "Remembering that: It is not recommended to use both by n reasons, so much so that there is…
-
1
votes2
answers203
viewsA: Button that scrolls the page up without reaching the top
Vitor is like this, the correct programming is always knowing how things are done and what each thing does. Then in your code you just change the value of the property scrollTop of 0 for 50 for…
-
3
votes2
answers60
viewsA: problem leaving a text on the left and 2 items on the right
One of the ways to solve this is by adding the Bootstrap class itself float-left and float-right: .col-item { border: 1px solid #E1E1E1; border-radius: 5px; background: #000; } .col-item .photo img…
-
0
votes1
answer181
viewsA: I’m not getting to bind with image
Personal for those who have the same problem just put the images inside the folder static which is created by Vue-cli at the same folder level Assets. Template: <div> <img :src="imagem"…
-
1
votes1
answer181
viewsQ: I’m not getting to bind with image
Someone could explain to me why I’m not able to render the image on the screen. I’m using the Vue-cli and the image is in the folder Assets inside the briefcase src normal, but when I call her in…
-
4
votes1
answer43
viewsA: remove class after 1 with Jquery
You were almost getting just missed adding again the class voted who had removed: $(function() { $('.voted').removeClass().addClass('voted star'); console.log($('div').prop('class')); }) <script…
-
4
votes2
answers86
viewsQ: Problem with @keyframes CSS
I’m making an animation with CSS but the effect is correct only in the first word of the text and the rest not. Would anyone know why this occurs? h3{ position: absolute; font-family: consolas;…
-
2
votes1
answer60
viewsA: Jquey-ui depends on Jquery
Yes, totally dependent on jQuery: "jQuery UI is a curated set of user interface interactions, effects, widgets and themes built on the jQuery Javascript library". source jQuery UI is a collection of…
-
1
votes1
answer41
viewsQ: Replacing an index with a string
I’m listing on the screen numbers of 1 à 15 and checking that the number is divisible by 3 and for 5 adding a text when true, until then it works, but, only that still displays the number below the…
-
1
votes1
answer470
viewsA: Change the input field type with jQuery
Your code didn’t work with attr pq you are using the current version of jQuery 3.3.1 using the prop to work with attributes the attr was used until versions 1.6: $(document).ready(function() {…
-
2
votes3
answers148
viewsA: execute Jquery calculation for each corresponding div
Face I confess that I did not understand your HTML well, but, I leave here an answer I hope that it helps you to give a north there: $(function() { $('.ratingAverage').each(function(index) { var…
-
5
votes2
answers2346
viewsA: Align image next to text while respecting vertical spacing
The way your code is, just put one margim-bottom in the p: p{ margin-bottom: 110px; } <p><img style="float:right"…
-
0
votes1
answer1562
viewsQ: Divide the body into 4 parts of different colors
It would be possible to get the result of the image below using only Css in the body? Obs: Unused divs As much as I could: body{ background: linear-gradient( to right, red 25%, green 25%, green 70%,…
-
0
votes1
answer55
views