Posts by Lucas Fontes Gaspareto • 3,656 points
86 posts
-
1
votes2
answers145
viewsA: Removing a tab-content and adding active class to content
I’ve developed an alternative to your need, let’s see what it does? This script will scan all tabs, which in this case is the <div class="tab-child">, checking if you have a child, if you have…
-
5
votes3
answers895
viewsA: Side menu in Angular
What you want to do is an "internal link" using the element <a href="#id">vai para id</a> next to another element that has its identifier corresponding to the tag <a>, example,…
-
2
votes3
answers1463
viewsA: Place images in a div with jquery
One too many alternative to your case is: @Edit: Following some suggestions, indicated by the friend @Sergio, considerable improvement in the code, follows changed var imagens = { 2015:…
jqueryanswered Lucas Fontes Gaspareto 3,656 -
0
votes2
answers475
viewsA: Installation Do icheck
You are initiating the icheck on input ? try this: <input type="checkbox" class="icheckbox_square-green"> $(document).ready(function(){ $('.icheckbox_square-green').iCheck({ checkboxClass:…
-
1
votes1
answer260
viewsA: Close Menu with Slidetoggle
Correct the attribute clas="menuMM" for class="menuMM", this is probably causing the error. I did an example on jsfiddle and worked perfectly.…
-
1
votes1
answer231
viewsA: How to keep header fixed without changing height when using scroll
Dear, inside your file script js. there is a function scrollPage(), is responsible for changing its header, follows below the function. function scrollPage() { var sy = scrollY(); if ( sy >=…
-
6
votes3
answers2079
viewsQ: Array value with highest occurrence
In an array, example [1, 2, 3, 4, 5, 2, 2, 3], what logics, methods and functions can I use to pick up the value with the highest occurrence, as in this example the 2.…
javascriptasked Lucas Fontes Gaspareto 3,656 -
1
votes1
answer1939
viewsA: Questions about functions and procedures within Packages(oracle)
What you’re seeing is the package specification. In this scope is shown the declaration of procedures, functions and etc... There is another part of a package, which is yours body (body), in it it…
-
3
votes2
answers244
viewsA: Customize css link as per url
Using this selector. a[href="http://site.com.br/nothing"] { color: red; } Reference.
cssanswered Lucas Fontes Gaspareto 3,656 -
4
votes1
answer101
viewsA: Execute function if input contains certain text
The error showing occurred because you tried to assign value to an element that does not exist. This will validate the value of the HTML element that has the id equal message. if…
-
14
votes3
answers596
viewsQ: What is the difference between DOM event handlers?
I would like to know the difference between, for example, <p onclick="fn()">click</p>, addEventListener('click', fn()); and document.getElementById().onclick = fn();. Is there any…
-
0
votes2
answers8499
viewsA: Subselect in Oracle bank
A subconsulta can return more than one record, so the operator should not be used = and yes the in. A different way to do this consultation is: select a.teste from teste a, tes_teste_2 b where…
-
1
votes2
answers366
viewsA: List all "date" attributes containing a particular code
I developed a method for you to do this, in pure javascript. About the performance, I did not make any test. Method: Pure Javascript using the function document.getElementsByTagName('*'); to get all…
-
4
votes2
answers4908
viewsA: Take the value of the Avascript table and place it in an array
One of the mistakes evident is in fact you are not adding the table rows in the right place, as in this image, when adding two products see where they were inserted in the code: Your code not many…
-
3
votes1
answer245
viewsA: How to know the name of an image with JS?
Following the logic I described in the commentary, below is an example. var slide = document.getElementById('slide'); var descr = document.getElementById('descr'); var arrImgs = [ ['Burguer King',…
-
10
votes7
answers1690
viewsA: Hexadecimal for RGB
Javascript var rgb = ['001', '000', '255']; var hex = '0100ff'; function converter(v) { if(typeof v === 'string') { var r = []; v.match(/[0-9a-f]{2}/g).forEach(function(arr) { r.push(('000' +…
-
5
votes5
answers269
viewsQ: Changing text in several different places of the HTML page
I’m thinking of developing a i18n for an application. My idea is: there is a text #i18n_label_name at a certain place on the page and #i18n_label_contact elsewhere. Question: What is the most…
-
1
votes2
answers2558
viewsA: How to get the value of inputs by declaring this of an element [jQuery]?
You can do through the function split(); once the function serialize(); returns a String delimited &. See the example below: $(document).ready(function(){ $('button').click(function(){ var arr =…
-
2
votes1
answer1018
viewsA: How to remove an already selected item from an upload Multiple
After a long search I discovered that the input of the kind file has an attribute files with prototype heritage of File, their values are readonly, in this case no change may be made. There is a way…
-
2
votes2
answers303
viewsA: Anchor locks with Parallax effect
In summary, following the definition of w3c the element <a> (anchor) when it has an attribute href="" worthwhile #identificadorrefers to another element within the same document that has an…
-
8
votes1
answer960
viewsA: What would be the best way to make a "vertical text" in HTML/CSS?
Using the properties text-orientation, writing-mode and transform you can get the result you want. Except in the case of transform these are specifications recent, maybe not having support for older…
-
0
votes4
answers32475
viewsA: Query to catch word after given character
Try it like this: select substring('começo;meio#fim', charindex('#', 'começo;meio#fim') + 1, len('começo;meio#fim') ) from tabela; See working here on sqlfiddle.…
-
1
votes3
answers441
viewsA: Use variable more times, click Event
Because of the variable option be defined in the overall scope and a declarative function, such as yours, receive the this directly from the global scope it is possible to use the this. In this case…
-
1
votes1
answer141
viewsA: Navbar is changed with scrolling
Assigning the function scroll() to the window object every time the scroll moves it will be fired by checking whether the scrollTop() window is greater than 100, if it is will add the classes that…
-
0
votes2
answers3059
viewsA: To group and remove lines with "null" values from this query in Mysql
This query returns the online questions. select a.idCliente, GROUP_CONCAT(distinct c.idPergunta), GROUP_CONCAT(distinct d.idRespostaPre), GROUP_CONCAT(distinct c.pergunta), GROUP_CONCAT(distinct…
-
2
votes1
answer256
viewsA: How to load Google MAP Charts library
The function Map() does not belong to package corechart. Try it like this: <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script>…
-
1
votes2
answers263
viewsA: Taking ID of the upper click div
Using the function parent() in jQuery you take the parent element of the element in question. In the example below, by clicking the button you are setting the background of the red parent div.…
-
2
votes1
answer420
viewsA: How to make a transition button similar to Google Translator for a mathematical operation
Expensive, I have developed a solution for your need, any doubt just comment, but the code is very eligible. Here is also an example on jsFiddle if you prefer. var conversor = { // Valores do Objeto…
-
4
votes1
answer779
viewsA: Displaying The Same Record Twice
Expensive, The querys below will return only the tables that exist in the requested table. Because the requested table contains more than one table it is necessary to use the distinct to prevent the…
-
1
votes1
answer361
viewsA: How to use oninvalid in textarea [HTML5]
Expensive, So that the element <textarea> invalid it is necessary to submit the field inside an element <form>, however, in its validation only the attribute required will validate the…
-
1
votes1
answer134
viewsA: Problem developing Wordpress comments.php form
Expensive, Add one more <?php endif; ?> at the end of your code, after I noticed the absence, probably this generated the error. Hug.
-
1
votes2
answers2251
viewsA: Oracle - How to force a field size on a Function return
In your case, to specify the size of a return you can simply enjoy the functions REPLACE and LPAD or RPAD. Example: return SUBSTR(LPAD('1', 6, '0'), 0, 6); Assuming your return has to be exactly 6…
-
1
votes1
answer280
viewsA: Can I have procedures with the same name and number of parameters in the same package (ORACLE)?
Yes, it is possible to create one or more procedures, functions, etc... in the same scope (e.g. package) with either different or equal amounts of parameters, names and types. The compiler will call…
-
2
votes1
answer227
viewsA: Transition-delay css 3
The Estate display does not follow the rule of trasition-delay already the property visibility yes only in a more rigid way (More info here on the difference between both properties). Perhaps a more…
css3answered Lucas Fontes Gaspareto 3,656 -
2
votes1
answer196
viewsA: How to control the positioning of a div with position Fixed?
I found an alternative to your problem which was to add another restriction in if: && $(this).scrollTop() < $('.comentarios-pag').position().top - 630 if the scroll is larger than 641 and…
-
2
votes4
answers489
viewsA: Sub-search with SQL
Hello, For this situation it is very simple to do. You should see which columns between the two tables have a link (FOREIGN KEY), in your case they are probably the columns "name" of the Artist…
sqlanswered Lucas Fontes Gaspareto 3,656