Posts by Mathiasfc • 5,837 points
148 posts
-
2
votes1
answer30
viewsA: defining sizes according to full load, or resize a page
An alternative to do this would be to set the width of the banners as follows: .banner-holder{ width:100%; } .carousel figure{ width:100%; } Or rather than define the css, takes the width of the…
-
4
votes2
answers2323
viewsA: Disable button after jQuery click
Hugo, I wouldn’t fit you like this? $("body").on('click', '[data-link]', function() { console.log($(this).data('link')); // Verifica se tem link if (typeof $(this).data('link') !== 'undefined') {…
-
1
votes1
answer192
viewsA: How to make two Radiobuttons enable and disable fields
Here’s a snippet with an example of how to do this using jquery, note that I added two classes(.grupoA, .grupoB) to differentiate the input's, so it becomes easier to manipulate them, the validation…
-
3
votes2
answers1028
viewsA: Create object with internal object array
I believe it would look something like this, you can go adding new objects in the array’s through the method push(); var caractere = { nome: 'Daniel' }; var data = new Date(); var linha = {…
javascriptanswered Mathiasfc 5,837 -
3
votes3
answers1993
viewsA: Exchanging TAG with Javascript
As @jbueno commented, changing the tag itself is impractical, the closer we can get to that would be something like: $('div').click(function() { $(this).replaceWith($('<section style="border:1px…
-
3
votes3
answers2161
viewsA: How to leave buttons fixed in floating div
Note that if you want to position an element relative to your parent or predecessor shall use position:absolute, with the position:fixed the element is positioned relative to the browser window,…
-
2
votes2
answers6642
viewsA: Shadow/edge effect in box
Follows a first alternative how to do, #box { background-color: white; position: absolute; width: 50%; height: 200px; font-family: sans-serif; font-size: 1.5rem; float: left; background: #FFFFFF;…
-
1
votes1
answer57
viewsA: Change the appearance of Alertdialog to the old one
You can set the theme by parameter in AlertDialog.Builder(Context context, int themeResId), as follows: AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this,…
-
2
votes1
answer382
viewsA: Use screen size in 100%
Just add the property position: absolute; in <div class="2">, follows an example snippet: #div1 { width: 80%; border: 1px solid green; height: 20px; } #div2 { width: 100%; border: 1px solid…
-
3
votes1
answer1062
viewsA: Calculate space between Div and Body
If the div is positioned at the top of the body the calculation p/ find that distance is the height of the body minus the height of div, thus, if the div is in another place as in the image you…
-
6
votes2
answers1770
viewsA: How to force a drop table into SQL?
The code below disables checking for foreign keys, with it disabled, you can delete any linked table, note that the checks must be triggered later p/ maintain the integrity of the structures. SET…
-
3
votes2
answers92
viewsA: Sum of values with javascript, error?
If I understand the problem correctly, it turns out that when you fill the array value, you use valor[x] = parseFloat(array_dados[x].value); note that this can result in filling out without an order…
javascriptanswered Mathiasfc 5,837 -
0
votes1
answer124
views -
4
votes1
answer1777
viewsA: Concept of Angular System
A component is a simplified "version" of a directive, which are basically markers or extensions of elements that make up the GIFT, these markers inform Angularjs to insert some functionality…
-
3
votes3
answers441
viewsA: Integer conversation in the rounding account 0.1
By default PHP uses numbers from floating point, in this specific case you can achieve the correct value by rounding, using round or use another type as: float, double. echo (int) round((0.1 + 0.7)…
-
0
votes1
answer228
viewsA: Change script date validation from mm/dd/yyyy format to dd/mm/yyyy format
All I did was format the fld.value, left in the format he understands, mm/dd/yyyy, so I gave a var testDate = new Date(inp) with the inp formatted, so it valid the date the right way, then just do…
javascriptanswered Mathiasfc 5,837 -
3
votes2
answers1173
viewsA: Space between Edittext and keyboard on android
Have you ever tried to set your android:windowSoftInputMode as follows: android:windowSoftInputMode="adjustResize" or android:windowSoftInputMode="adjustPan" by definition, according to the…
-
0
votes1
answer231
viewsA: Javascript - Prevent select option smaller than other
As our friend @Sergio commented, if you set out the conditions, say what should happen, the answer may be more precise, but this validation can be done in a very simple way, if the value of the…
-
2
votes1
answer86
viewsA: Preserve line breaking when Replicate val() content in span
This code will replace all line breaks \n in tags <br/>, combinations are to work in several browsers. $('textarea.skills_knowledge').blur(function() { var skills_knowledge = $(this).val();…
-
2
votes2
answers65
viewsA: Keyup event should not activate with special keys
If I understand what you want, an alternative would just call certain event if the key C is triggered without any combination, in other words, the event is triggered only if you click only the key C…
-
5
votes2
answers71
viewsA: Shortcut navigation between keys
To switch between them, just be with the cursor in one of them and trigger the command Ctrl + [ *note that there may be change in the shortcut depending on the keyboard, but this can be easily…
visual-studio-2015answered Mathiasfc 5,837 -
5
votes2
answers376
viewsA: Sort Select by javascript ID
You can sort your drop using the method sort();, it enables the sorting of the elements through any attribute, for more information on the method a look at documentation, *In your case I’d be: var…
-
0
votes3
answers1211
viewsA: Remove last character from a string when the character is a blank
It’s simple Amanda, as @Marconi commented, applying a trim on the right side of your string, the white space is deleted regardless of how many have, so you can use your code that will not error by…
-
8
votes2
answers590
viewsQ: What is the useshellexecute property for?
Developing an application in c# I came across the property UseShellExecute in the following code snippet: ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = false;…
-
2
votes3
answers164
viewsA: Retrieve a checkbox id by the class using getElementsByClassName()?
Wagner, by what I noticed your code is already picking up the element ID through the method getElementsByClassName(), only have some problems that may be confusing you. The second element <input…
javascriptanswered Mathiasfc 5,837 -
1
votes1
answer356
viewsA: Javascript using mobile browser does not run
I took a quick look here and saw that in this case it would be best to use the events onkeydown or the onkeyup in place of onkeypress, according to reports obtained in the following links: keypress…
-
4
votes1
answer368
viewsA: Leave softer effect
Maybe the animate() jquery whatever you’re looking for, it executes a custom animation of CSS properties, follow an example in your context: $( ".header-container" ).animate({ borderTop: none },…
-
3
votes1
answer513
viewsA: Swap image while scrolling down page
With jquery $(window).scroll(function () { //console.log($(document).scrollTop()); if ($(document).scrollTop() >= 10) { $('img').attr('src', 'imagem_2.png'); } else { $('img').attr('src',…
-
1
votes1
answer58
viewsA: Toggle() and position() method together in jQuery
Possible most of the time is, just do not see a use in doing this, note that the position() by definition returns an object containing the property top and left and in accordance with the…
-
6
votes3
answers3386
viewsA: Limit of input characters
There are many ways to do this, as @Jessika commented: <input type="text" class="loading" maxlength="255"> If you want to do the same, using jquery function limitaCampo(campo, tamanho){…
-
2
votes1
answer435
viewsA: How to show an image in the Marker information window?
According to the own documentation google, you can simply put the image tag in a string and pass it to the content of infowindow. ex: var contentString = '<img src="image.png">'; var…
-
2
votes1
answer72
viewsA: Table scroll with roll position according to date
I suggest to do this using jquery, follow an alternative solution, take the current day and use the .animate() to scroll to the respective element of the selector, the -140 is just to center the…
javascriptanswered Mathiasfc 5,837 -
1
votes1
answer35
viewsA: Data jQuery problems
Follow a snippet with a alternative solution, note that was giving an error because in your code var valor= $('.pizza').val()); is with an extra parenthesis, something else is the variable desconto…
-
3
votes1
answer607
viewsQ: How many elements does an array have?
I have a array of 10 positions which is filled through a function, ARMultiEachMarkerInfoT marcadoresVisiveis[10]; always before adding elements to the array, the function clears all elements and…
-
1
votes1
answer3084
viewsQ: What are the ascii codes of the arrow keys on the keyboard?
I am working on a project in C and came across the following method static void keyEvent( unsigned char key, int x, int y) { /* quit if the ESC key is pressed */ if( key == 0x1c ) { printf("*** %f…
-
1
votes1
answer131
viewsA: How to increase the source in Semantic UI
Semantic UI requires nothing out of the ordinary, da para aumentar o font size simply using a CSS class: .cabecalho{ font-size: 250%; } <span class="cabecalho"></span> If you want to…
-
7
votes2
answers357
viewsA: Eventos Bubbles Javascript
It’s a very simple concept, sometimes the shape that is presented leaves a little confusing, but basically an event .bubbles returns a boolean value indicating if a given event is "bubbling". The…
-
2
votes1
answer55
viewsA: How to make that jquery foreach does not repeat the data when I open model window?
You can clear the data in the event that is triggered when the modal is closed, for example: $('#modal-add-agent').on('hide.bs.modal', function () { ... }); Whenever you close the modal…
-
2
votes1
answer397
viewsA: Relating dynamic inputs with datalist to other dynamic inputs
Following an alternative implementation of what I understood of the problem, there are certainly better ways to implement, the code is well self-explanatory but follows a brief description of what…
-
8
votes5
answers1461
views -
1
votes1
answer55
viewsA: I cannot increment my variable without resetting the code
I tried to change as few things as possible in your code, first I removed the form, I find it unnecessary in this case, I put the variable tentativa out of the function and increment it as the user…
javascriptanswered Mathiasfc 5,837 -
2
votes2
answers4715
viewsA: Toggle() Effect Down, Jquery
I believe you’re looking for .slideToggle() instead of .toggle(), the standard behavior of .slideToggle() in jquery is "slideup" or "slideDown", ie slide p/ up and p/ down. If you want the div go/…
-
1
votes1
answer76
viewsA: Login with Facebook - Iserir profile image in a <input type="file">
It has several ways to get the profile image of the user, through the ID on the web, we can achieve as follows: http://graph.facebook.com/" + facebookId + "/picture? type=square…
-
2
votes1
answer55
viewsQ: How to delete a specific class from querySelectorAll?
I am working on a project where I use bootstrap modals, for a problem of overlapping some elements, I needed to use a script that always assigns the highest value z-index +10 from the page to the…
javascriptasked Mathiasfc 5,837 -
5
votes1
answer37
viewsA: Length of content returning incorrect value
W/ this check use the event .keyup instead of .keydown, since the new character will only be included in fact after the event .keyup. Follow a functional example returning the correct value:…
-
2
votes3
answers419
viewsA: How to know if a key in sql server is Identity
Complementing @Artur’s reply, if you want a relation (table/column) of all identitys keys of a given database: select o.name, c.name from sys.objects o inner join sys.columns c on o.object_id =…
-
2
votes1
answer56
viewsA: Organizing app photos into folder
Raphael, I found this method that creates a directory and saves the file in the folder you set, note that it asks the Bitmap the image to be saved and the file name that in your case I believe would…
-
3
votes2
answers642
viewsA: apply event to an input with jQuery
Hugo, the code below goes through all the elements that have the class .margem and checks that the element has a val(), if you own it applies the event keyup(). $(document).ready(function() { //…
-
5
votes2
answers54
viewsA: Running a script through the name attribute does not work
The element is not a input and yes a select, in jquery there are several types of selectors, in the example below I used name*='dd_medidaAplicada', that is, any select item that contains…
-
0
votes4
answers768
viewsA: Add mask from a select
Complementing the @Jessika response, follows an alternative using the function change() of jquery itself. *Note that it is necessary to use the Mask plugin jquery *The method unmask() removes the…