Posts by Mathiasfc • 5,837 points
148 posts
-
1
votes3
answers535
viewsA: Take element data attr Datatables/jQuery
Gabriel, you would need to identify the <li> somehow p/ know in which li you will do this class check. With the li identified you can check if she owns the classes as follows:…
-
3
votes3
answers749
viewsA: How to treat High and Low Letters Box along with Symbols
Diego, follow a alternative solution that I worked out here quickly, basically what I do is take all the ids of the elements, then I remove all the special characters with .replace(/[^\w\s]/gi, ' ')…
-
4
votes0
answers99
viewsQ: What is prototype-based programming?
Reading about javascript I came across the term prototyping-based programming, and I also saw that in devmedia claim that javascript is an object-oriented language based on prototypes. Finally I…
-
5
votes2
answers6031
viewsA: How does . Closest() work in Jquery?
The method .closest() finds the element father nearest that satisfies the dial condition, here has a brief explanation of closest() and also compares it with the parent(), note that the closest()…
-
9
votes2
answers640
viewsA: What’s the clip property for?
The estate clip is used to crop an absolutely positioned element, serves for cases where an image is inserted inside an element smaller than it, in which case we can use the property clip to crop…
-
2
votes1
answer46
viewsA: Problem with div size when scrolling the page
Usa //$(window).scrollTop() == 0 || 0 == false if(!$(window).scrollTop()) instead of if(top == 1500) If he’s at the top of page a div back to normal var scrollTimer = null;…
-
6
votes7
answers15010
viewsA: Print "n" natural odd numbers
A very simple alternative would be with the function range(start, stop, step) Start: initial sequence number. Stop: up to this number, but does not include it in the sequence. Step: difference…
-
0
votes1
answer62
viewsA: Run Submit after auto complete field
An alternative would be to call the submit() form when the field loses focus through the event onfocusout <input type="text" name="accounts" onfocusout="form.submit();" size="20"…
javascriptanswered Mathiasfc 5,837 -
2
votes1
answer473
viewsA: Stylization in Bootstrap
Responding to 1st question: Yes, you can create your own files css, style the way you want any component you want. Responding to 2nd question: Bootstrap helps you develop in a responsive way,…
-
4
votes1
answer3463
viewsA: Problems to generate APK in Android Studio
I was going through the same problem these days, marked the two options and managed to generate the apk and test normally. I found that is a new signature engine introduced in Android 7.0 with some…
-
2
votes2
answers100
viewsA: Click detection and value collection
To detect the click using pure javascript in some element //Por questões de compatibilidade com o IE //Esta função irá obter o elemento do evento de uma forma compatível com o navegador function…
-
3
votes4
answers760
viewsA: What are Path Finding Algorithms?
What are? As the name itself says, are algorithms that seek to find the path of an X point to a Y point within a data structure, usually graphs. What types exist? There are all kinds, algorithms to…
-
4
votes4
answers150
viewsA: How to use unsafe code on a Web Site
Complementing the @jbueno response, when the project is not a web application this option does not appear in the tab build in properties, try to put the following snippet in your web config.:…
-
1
votes2
answers1517
viewsA: String count in textarea Angularjs
There is yes, in your case would be: <textarea class="form-control" type="text" name="description_validate" ng-model="group.description"…
-
3
votes2
answers121
viewsA: Wait or check append
Unfortunately the method append() do not have a callback p/ check whether it was done or not, then arise the alternatives to use setTimeout, but as in your case you said it can vary a lot, try to…
-
9
votes1
answer26954
viewsA: Open modal bootstrap automatically when loading page
You are using the correct way to open the bootstrap modal: $(document).ready(function() { $('#exemplomodal').modal('show'); }) How the error in the console is .modal is not a Function Then probably…
-
8
votes4
answers9040
views -
1
votes2
answers1145
viewsA: Change the background color of an element when scrolling the page
As @Leo Letto commented, you are applying the color to the body and not the header, follow a functional example of your code. $(document).ready(function() { $(document).scroll(function() { var alpha…
-
2
votes2
answers572
viewsA: How to load content on a page according to the element you previously clicked on?
An option would be to pass parameter in the URL, in the example I passed item ID. $(document).on('click', '.itemGaleria', function() { var itemGaleria = $(this).attr('id'); if (itemGaleria ) {…
-
2
votes3
answers1279
viewsA: Is there any way to make a div son, float while rolling the scroll of the father div?
As his friend @Cʜᴜɴ commented, just changing from position:absolute; for position:fixed; to div (red) center keeps fixed, and changed position(top,left) p/ keep it in the center. #Pai { position:…
-
0
votes2
answers835
viewsA: Scroll event
A suggestion would be to change only the opacity, and instead of using document.scrollTop used window.pageYOffset, your code would look like this: document.addEventListener("scroll", function() {…
-
3
votes2
answers825
viewsQ: Create directory and add files to query later on android
I am new in the area of Development. mobile, I am developing a simple app that uses the library Tesseract-OCR in Android Studio and I came across the following situation: I need to store some files…
-
0
votes2
answers140
viewsA: Soon accompanying page scroll(problem)
Here is an example of a fixed header at the top that accompanies the scroll, as the friend andrepaulo commented, there are several ways both with jquery and css to make an "animation" to fix the…
-
4
votes1
answer4275
viewsA: What is the difference between using focusin/focusout and Focus/Blur?
Briefly, .focusin() and .focusout() are events that "bubble" while .focus() and .blur() nay. Running the example below you will notice that the input calls all events, the parent only the focusin…
-
4
votes1
answer18787
viewsA: Start with hidden div and show with button
Based on the most voted and accepted answer of the question you presented, follow the solution alternatives, just add the property display:none in the style of div, using Angularjs ng-init="MinhaDiv…
-
8
votes1
answer2694
viewsA: How to detect collision between two squares/rectangles
To show how the collision detection between two objects works I will use two div's square in a plane 2D, but collision detection can be applied to any form of object, provided we have the dimensions…
-
2
votes1
answer207
viewsA: Problem in scroll hover
I did several tests and the div continued to fade, until I customized the scrollbar and worked as expected. So since the problem is only with Chrome, you can use a scrollbar customized, has various…
-
0
votes3
answers173
viewsA: How to capture the numbers for a single line array?
Thomas, whether or not it is a homework I will give you a north to do the code, you can ask for the size of the array p/ the user as follows: int tamanhoArray; std::cout << "Informe o tamanho…
-
0
votes2
answers727
viewsA: Calculate inputs with Jquery
Rogério, I believe that this is what you were trying to do, I made the code as simple and intuitive so that you understand well what is happening, in each input put the function change which detects…
-
5
votes2
answers339
viewsA: How does the display property work?
The estate display is the most important property of CSS to control the layout, the default value can vary from element to element, generally the default value is display:block or display:inline.…
-
21
votes6
answers24229
viewsA: What is the difference between padding and margin in CSS?
Basically padding is space between the content and the edge, while margin is space overboard, follows an illustration found on google. According to the w3schools Padding:CSS fill properties are used…
-
5
votes3
answers537
viewsA: How to remove the space of "4 980 Raphael" only between numbers
Take a look at the code below, remove the first blank space found. echo "4 980 Rafael" | sed '0,/[[:blank:]]/s/[[:blank:]]//' [[:blank:]] is a POSIX regex class that removes blank spaces, tabs...…
-
2
votes2
answers658
viewsA: Ask and store user permission to use full-screen?
Unfortunately for security reasons, specifically the chrome disables the mode automation fullscreen, requires prior permission from the user to activate it. I used this code to trigger the mode…
-
1
votes2
answers1131
viewsA: Javascript sum or subtract by clicking checkbox
Follow an example using Jquery. var total = 0; //Chama a função com click em qualquer checkbox $(':checkbox').click(function() { //Atribui o valor do input p/ variável 'valor' var valor =…
javascriptanswered Mathiasfc 5,837 -
0
votes1
answer515
viewsA: Style (css) SVG with border
To leave the icon unfilled simply add fill: transparent; in the hover, in that way: svg:hover #id { fill: transparent; } The question of the edge is a little more complicated because the property…
-
1
votes4
answers2194
viewsQ: How to block the click on an input
I’m trying to block the click on one input Html <input id="txtData" class="form-control" /><span class="input-group-addon" data-role="data"><i class="glyphicon…
-
0
votes1
answer85
viewsA: How to share a text on facebook without having the app installed on Android?
This snippet of code shares on facebook without necessarily having the app installed, it checks if you have the app, if you don’t have it share, but in this case it’s sharing a Link, I hope the…
-
-1
votes3
answers368
viewsA: How do I switch to switch to css?
In my projects I use the following code and works well: Html: <link id="theme" href="dark.css" rel="stylesheet"> <button id="whiteTheme" data-theme="white.css">White Theme</button>…
-
2
votes1
answer126
viewsQ: How to detect changes in the DOM (Document Object Model)
With every change in GIFT (Document Object Model), whether it is an inclusion, exclusion or even a modification in some element I would like to perform a function, there is some "simple" way to do…
-
4
votes2
answers550
viewsA: Do I calculate font size using css?
The function calc() is very interesting as it is a native CSS way to do calculations with the ability to mix units of measure that is only possible because it performs these calculations at the same…
-
0
votes1
answer150
viewsA: Color Sharepoint Calendar "Javascript" "Jquery"
Tiago, it’s very simple what you’re trying to do, so I figured just switch between CSS classes correct? Below is a code that does exactly the same thing and I believe it will not cause compatibility…
-
1
votes1
answer70
viewsA: Hide Keyboard when sending message
That’s probably what you’re looking for, this snippet of code forces Android to hide the keyboard, View view = this.getCurrentFocus(); if (view != null) { InputMethodManager imm =…
-
-1
votes2
answers76
viewsA: How to reload page if user has returned to browser history
There is no event that detects whether the user has clicked the back button in the browser history, so I believe the best way is to work with SESSION. When accessing a page, you fill in a SESSION,…
-
1
votes1
answer108
viewsA: How to know when a Thread has been completed
Every time you finish running the thread or even when an error occurs it goes to the state TERMINATED . if(t4.getState()!=Thread.State.TERMINATED){...}
-
1
votes2
answers327
viewsA: Fixed first row table using Material Design Lite
Hello, maybe this code helps you, I adapted the response of the following post: Fixed table header for your problem. The code below shows a table with the fixed header using Material Design Lite, if…
-
3
votes2
answers129
viewsA: Change cursor in "onhover" event to HTML5 <video>
I did some research and I saw that there are these pseudo-elements that maybe you can use: video::-webkit-media-controls-play-button video::-webkit-media-controls-volume-slider-container…
-
2
votes2
answers549
viewsA: Display Multiple input images with Jquery
I believe the code below is what you are looking for, whenever there is any change in the input is called a function that reads and displays the stored file if possible.…
-
3
votes2
answers142
viewsA: Popular Dropdownlist from another
Hello, in the code below there are two drop’s where the second is populated with all the options of the first except the option selected, I hope it helps. function popularOptions2() { $("#options1…