Posts by Diego Souza • 16,524 points
642 posts
-
1
votes0
answers1342
viewsQ: Get Date Attribute in DIV
In certain div I do an area calculation for a responsive website. <div id="iframe-game" class="help" data-scale="0.8264794383149449"> </div> By jQuery I try to get the value of the…
jqueryasked Diego Souza 16,524 -
2
votes2
answers499
viewsQ: How to make this MENU with CSS
HTML <nav id="menu-navigation"> <ul> <li> <span class="icon building"></span> <a href="#" title="">LINK UM</a> </li> <li> <span class="icon…
-
3
votes1
answer160
viewsQ: How to Transition in Hover
I’m making an effect for MENU using CSS and jQuery. Problem The transition works from the element to itself with action hover. Otherwise it doesn’t work. The CSS below does the following: There is a…
-
1
votes2
answers1499
viewsQ: Form being sent twice in a row
I have this code in my JS: $('#form-sign-in').bind('submit', function(e) And in my FORM has a Input Type Submit. When I click on it to make a simple registration, it is sending two requests. I’m…
-
1
votes5
answers364
viewsA: Hierarchy between CSS styles
What you have to set first are patterns. What will be the default button, for example ? Size Padding Rounded Edge What will change in the button ? Coloured Border Color Letter Color So, // Padrão…
-
4
votes1
answer239
viewsQ: Catch Cover Facebook API SDK JS
I’m trying to get the Facebook cover of the logged-in user, but I’m not succeeding. FB.login(function(response){ if(response.authResponse){ FB.api('/me', function(fb){ var email = fb.email; var nasc…
-
2
votes1
answer1053
viewsQ: Line-Height - Leaves No Vertically Centered Text
I’m using the line-height to center a text vertically. But the text seems to me to have a small margin. Look at the image below, I selected the font to better see the spacing that’s making the…
-
0
votes2
answers327
viewsA: Element:First-Child Does Not Work
Solved. I specified a class for the element. .marginTop10 { margin-top: 10px; } <h2 class='marginTop10'>Teste</h2>
-
0
votes1
answer49
viewsQ: Facebook API - Secure Canvas URL
I’m trying to make an app work on Facebook and have interaction with the site I’m developing. The goal is for the user to log in through Facebook on the site. It turns out that every time I try to…
facebook-apiasked Diego Souza 16,524 -
1
votes1
answer307
viewsA: Problem with CSS and ASP Button
Try it like this: <asp:LinkButton ID="idButton" runat="server" CssClass="classButton" CausesValidation="False" Text="Button" /> .classButton{ padding: 8px 10px; display: inline-block;…
-
1
votes2
answers1005
viewsA: jQuery - Use two functions together
$(document).ready(function(){ $("#cpf_cnpj").on('load blur',validaCpfCnpj); function validaCpfCnpj(){ // Script } }); It can be done like this: 1 - Create event independent function. 2 - Then call…
-
1
votes1
answer1449
viewsQ: Enable PHP File Info Extension - Runtime
I’m using a library called Intervention/Image in Laravel 4.2. On a given page I use this library to crop images, but it’s not doing this because it requires you to enable or install this extension.…
phpasked Diego Souza 16,524 -
0
votes2
answers987
viewsA: PHP: Picking up function argument with preg_match_all
I put as an answer Everton. $re = "/(\\W|^)este é um texto alternativo(\\W|$)/"; preg_match_all($re, $data, $matches); print_r($matches)
-
1
votes3
answers866
viewsA: Image with horizontal hr centered vertically in half
I removed your inline CSS from HTML. Never do it again unless it’s an email signature. Anyway, that’s beside the point. In the elements below I distributed by means of display:inline-block and used…
-
0
votes1
answer256
viewsA: Element Position Before Dragging - Droppable - jQuery
I was able to solve it using the callback active. // Ao clicar sobre o elemento activate : function(event, ui){ positionTopPiece = ui.draggable.css("top"); // Posição de Origem - Para caso errar,…
-
1
votes1
answer97
viewsA: How to make image stand above text with media queries
No need to use the float in that case. I like to use the display:inline-block which is compatible with various CSS properties. I just made an example below. Use the property display worthwhile…
-
0
votes1
answer256
viewsQ: Element Position Before Dragging - Droppable - jQuery
I am making a game and need to get the position of an element before dragging it. I am using the function Droppable jQuery UI. jQuery $("div.cesto").off().droppable({ accept : "span.piece", //…
-
0
votes2
answers415
viewsA: HTML file download Excel
1 - Check the file name, the file extension. It would be nice to be all tiny, no accent and no spaces. 2 - Check the file location. Following the same guidelines above. Lowercase letters, no accent…
-
1
votes2
answers90
viewsA: Search for two Mysql tables in php
Use Inner Join, Left Join or Right Join for relationships on tables in your query. Visually it’s more beautiful too. SELECT c.lugar, c.dorsal, r.nome, r.equipa FROM classificacao c INNER JOIN…
-
1
votes2
answers123
viewsA: Destroy multiple sliders at once
I managed to fix it. It was simple, until. $(".owl-carousel-linhas").each(function (index, obj){ $(this).data('owlCarousel').destroy(); }); I switched the obj for $(this).…
-
0
votes3
answers160
viewsA: Do not fill in field if it does not exist
Use the function Coalesce or Isnull if it is SQL. If it is Mysql use Ifnull. Select id, coalesce(tipoA, 0) as tipoA, coalesce(tipoB, 0) as tipoB From tabela1, tabela2 But it is good to have a…
-
2
votes2
answers123
viewsQ: Destroy multiple sliders at once
I want to destroy all my sliders when the page hit the size of 768px. For this I made this code below: if($(window).width() >= 768){ $(".owl-carousel-linhas").data('owlCarousel').destroy(); } I…
-
1
votes3
answers52
viewsA: Mysql -> Assign Id’s to records
The value of the column OWNER to Villages without owner could be 0 and not -1. Then you would do: Select * From Aldeias Where Dono = 0 Return all villages that have no owner.…
-
3
votes0
answers94
viewsQ: Webcam Canvas - Zoom
Is there any way, a command that will allow me to change the webcam zoom ? In this code below is where I create my Webcam canvas for Snapshot on the site. I want to apply - zoom, ie increase the…
-
2
votes2
answers327
viewsQ: Element:First-Child Does Not Work
In this example below there is an element .title. And in it I’m putting one first-child with margin-top:20px;. When compiling and saving is not working. Do not apply the top margin on the first…
-
1
votes2
answers3389
viewsA: Quotes inside quotes to send string parameter
Close the quotes in the function and then open again. Really, this could be the mistake. echo "<div class='tipoPagamento' onclick='".SelecionarTipoPagamento($row['CODIGO'])."'> <font…
phpanswered Diego Souza 16,524 -
2
votes2
answers434
viewsA: no fixed menu when scrolling the page
I changed your code. Change your JS to: var nav = $('.menu-header'); var num = $('.menu-header').offset().top; $(window).bind('scroll', function() { if ($(window).scrollTop() > num) {…
-
3
votes2
answers3930
viewsQ: Father Height Element and Sons Position Absolute Elements
I have a div - position:relative. And inside that div I have several divs- position:absolute. Thus the height of div parent does not work automatically. I want the height automatically adjust to the…
-
2
votes1
answer423
viewsQ: Translation Theme Opencart
I am to buy an Opencart theme on Themesforest, but would like to know if any theme I buy have translation option. Both the website and the Panel. It’s a translation package that bass or have to do…
-
2
votes1
answer545
viewsA: Links does not work in the menu
It’s because there’s a li:focus, I believe because of the click function. Switch to li:hover. But if you still want to CLICK, import a jQuery for your code and make the code below.…
-
2
votes1
answer93
viewsA: Logic to inhibit record permanently
If you are writing this data also in a database you can do the check by name. You have a routine that reads XML and extracts the data on the screen, correct ? Create a table in a database, like,…
-
3
votes3
answers4902
viewsA: How to load a dropdown with a selected value
Makes a FOR searching the list of periods and makes a SELECT returning the course values outside the FOR. From there on in the FOR you make a IF checking whether the field being listed is equal to…
-
2
votes1
answer2825
viewsA: query between 2 tables
There are many ways to do it... But there are two I always use. Using JOIN in Laravel or using relationship functions in the corresponding Model. Using JOIN: $query = DB::table('tbl_produtos')…
-
2
votes1
answer228
viewsA: Sort data with google Chart
It’s not just you reversing the positions of the Abels ? ['1º ano', 'Básico', 'Abaixo do Básico', 'Proficiente', 'Avançado'], ['2º ano', 'Básico', 'Abaixo do Básico', 'Proficiente', 'Avançado']…
-
1
votes3
answers137
viewsA: Message when entering the page
Use the JS onload function. document.onload = function(){ document.getElementById('box').style.display = 'block'; }; <div id="box"></div> #box { background: #000; border-radius: 10px;…
javascriptanswered Diego Souza 16,524 -
4
votes2
answers3514
viewsA: Delete in the database using ajax and jquery
Change <a href='excluirUsuario.php' id='btn_Alterar'><i class='glyphicon glyphicon-pencil'></i></a> For <a href='excluirUsuario.php' id='".$ID_DO_USER."'…
-
1
votes2
answers268
viewsA: Jquery - Hover() and mouseleave()
jQuery: $('#div1').hover(function() { $('#div2').show(); }).mouseout(function() { $('#div2').show(); }); $('#all').mouseleave(function() { $('#div2').hide(); }); CSS: #all { display: table; } #div1…
-
1
votes2
answers65
viewsA: Doubt about ajax
Create a page with a Select by searching the records and with the same formatting as your list. And in ajax you do: $("#lista").load('lista.php'); jQuery.ajax({ type: "POST", url:…
-
2
votes2
answers129
viewsA: Responsive Design
This site has a summary of what each property of Medias Querys means. http://tableless.com.br/introducao-sobre-media-queries/ But don’t worry too thereby. Now, what comes first ? It depends on your…
-
1
votes2
answers217
viewsA: Displaying link name through url
Use regular expression. In the case below you look exactly for the word in question. The function returns an Array() with the results. $re = "/(\\W|^)google(\\W|$)/"; $str =…
phpanswered Diego Souza 16,524 -
1
votes2
answers1948
viewsA: SQL - set null values to 0
It has an SQL function called Coalesce. When a value is null it returns the value of the parameter you determine in it. Or you can use the function Isnull. Select Coalesce(Valor, 0) As Valor From…
-
1
votes1
answer1552
viewsA: Create database via existing command line and overwrite
Deleta Database Cria Database Drop Database BD Create Database BD
-
1
votes3
answers2938
viewsA: Assign CSS value to an HTML via Javascript
For you to work with elements positions, TOP, LEFT, RIGHT, BOTTOM you MUST use the property Position, with Relative, Absolute, Fixed values... Otherwise you can use the Margin-Top, with a value of…
-
2
votes2
answers54
viewsA: What is the right way to add a button to the php file
You don’t need that, Renan. Close the PHP routine with ?> and adds the button in the same HTML language. But if it’s really necessary to do what you want: echo "<button type='button'…
phpanswered Diego Souza 16,524 -
1
votes3
answers944
viewsA: Calculus in Javascript
You must create a function or make a comma-taking routine in the same way. Comma is considered text (string) and no calculations are made with text. But the right thing is to replace the comma by…
jqueryanswered Diego Souza 16,524 -
5
votes4
answers10243
viewsA: How to align <li> items from a <ul> list below?
I do so using the properties display:table and display:table-Cell and vertical-align:bottom display:table - Parent Element DIV display:table-Cell - Child Element UL with vertical-align:bottom div {…
-
2
votes1
answer258
viewsA: Set the field return size
You can use the function SUBSTRING. SELECT substring(a.nome from 1 for 50) FROM Tabela a
-
2
votes3
answers931
viewsA: How to check the empty values of a dynamic form?
Use the function each $('input[name="nome[]"]').each(function(i, item){ if(item == "") console.log("vazio"); });
-
3
votes1
answer646
viewsA: HTML editor made in HTML
Ckeditor ? http://ckeditor.com/ Maybe it’ll work for you. But the one you posted isn’t just clicking on the option Source of the editor ?…
-
1
votes2
answers256
viewsA: How to position an image with vertical-align?
There are several ways to do this. But if I understood you want to make a vertical-align Middle. Okay ? To use the vertical-align regardless of its value, one should use the property table,…