Posts by Carlos Rocha • 1 point
426 posts
-
-1
votes1
answer42
viewsA: Stylize Placeholder
if ($("#nome").val() === ""){ $("#nome").addClass("red").focus(); return false; } I created a class
jqueryanswered Carlos Rocha 1 -
-4
votes1
answer42
viewsQ: Stylize Placeholder
if ($("#nome").val() === ""){ $("#nome::placeholder").css("color", "red"); $("#nome").focus(); return false; } My goal is set the color of placeholder for red if the name field is emptiness I…
jqueryasked Carlos Rocha 1 -
1
votes1
answer40
viewsQ: How to recover variable value (custom Property) CSS?
For example, I have a variable defined in my style sheet: :root { --limite: 90vw; } To retrieve the value of this CSS variable in jQuery in such a way that each time this resolution changes (yes, it…
-
0
votes1
answer103
viewsQ: Background with Parallax does not appear
https://codepen.io/carcleo/pen/JjbYQWa In the code below (and also in the codepen above) I have 2 div’s where I’m doing an effect Parallax. But I need to make the effect happen with background…
-
0
votes0
answers56
viewsQ: Lock . click() on a label
I have the following code: $("input[type='radio'][class='tipo']").click(function() { url = $(this).attr('data-route'); id = $(this).attr('id'); $.ajax({ url: url, type: "POST", dataType: "json",…
-
-2
votes2
answers75
viewsQ: Button can not mark radio button nor do right in div
good morning! I have the script below that is with two flaws: When I click on buttons the radio Buttons are not being marked When you click the button on the right, the ball moves to the left and…
-
0
votes1
answer68
viewsA: Instantiate typed variables in the constructor via reflectionClass
Answer to whom can be useful as it was to me: $constructParams = []; //Fazemos a Reflexão da function da classe $reflectionClass = new \ReflectionClass($controller); //pegamos seu construtor caso…
phpanswered Carlos Rocha 1 -
-2
votes1
answer68
viewsQ: Instantiate typed variables in the constructor via reflectionClass
I’m developing a applying with Friendly URL’s and there comes a time when I can’t find a way out. I got the following: $constructParams = []; $reflectionClass = new \ReflectionClass($controller);…
phpasked Carlos Rocha 1 -
-2
votes1
answer69
viewsQ: How to execute a require_once within a method of a function being passed as a parameter of another function?
I’m trying to understand and make a PHP router. index php. <?php require_once 'config.php'; require_once 'router.php'; ?> config.php <?php error_reporting(E_ALL); ini_set('display_errors',…
-
-3
votes1
answer75
viewsQ: setInterval does not stop after restarted
I’m trying to create a slideshow but customized without relying on third party library (save, jQuery); The goal is: The slide rotate endlessly. When passing the mouse on slide, he must stop; By…
-
0
votes1
answer502
viewsQ: Check if Jsonobject has a certain key
this.token() is a String of the kind {"erro" : "Valor do erro"}. But also, in case of success it may be: {"token" : "Valor do token"} My goal with the code below is to find out if the first index of…
-
-1
votes1
answer37
viewsQ: Android Locked When Calling API
I have this method in the main: private String token () throws IOException { String login = this.login.getText().toString(); String senha = this.senha.getText().toString(); Login dados = new…
-
-4
votes1
answer73
viewsQ: Java array with alphanumeric indices
Merry Christmas to all! How do I, in java, that array? { "Aluno" => "fulano", "Idade" => 33 } I thought about Arraylist, but it didn’t work out I thought about List, also did not work Think…
javaasked Carlos Rocha 1 -
0
votes1
answer84
viewsQ: Deserialize Object in array after json_encode
I have an array of objects. But before sending these objects in the array, I do serialize() in each index of the array because they are objects: function serialize(){ return…
-
0
votes1
answer357
viewsQ: How to receive headers from Curl?
I’m making a request via Curl as follows (it is only test, not in production) <?php $post = [ "Primeiro", "Segundo" ]; $headers = [ 'Terceiro', 'Quarto' ]; $ch = curl_init(); curl_setopt($ch,…
-
-1
votes1
answer205
viewsQ: Calculate height difference with CSS
There’s a way for me to do the code below, which is in Jquery, but with CSS? $(document).scroll(function() { if ( $(this).scrollTop() > $(window).height() ) { $("section#topo").css("height",…
-
0
votes1
answer64
viewsQ: contender by changing and changing size of img
html { box-sizing: border-box; } body > section { display: flex; justify-content: center; width: 100vw; } section#categorias > div.internas > div { display: flex; flex-wrap: wrap;…
-
-1
votes1
answer25
viewsQ: Location jquery in new tab
How do I do the Location below open in a new guide? $(".mySlides").click(function(){ let url = $(this).data('value'); $(location).attr('href', url); });…
jqueryasked Carlos Rocha 1 -
0
votes2
answers40
viewsA: Restore UL size when leaving focus!
With the helping of colleague Hugo, I managed to make my own solution in a way that I can understand. But for his help, I accepted his answer as satisfactory. However, I want to leave my…
-
0
votes2
answers40
viewsQ: Restore UL size when leaving focus!
I have the code down below: $("ul#menu > li").find("label").hover ( function(e) { e.stopPropagation(); let ul = $(this).parent().find("ul"); ul.css('display', e.type == "mouseenter" ? 'flex' :…
-
-1
votes1
answer69
viewsQ: Problem with square image height within rectangular div
I have the following structure: <style> display: flex; flex-direction: column; align-items: center; width: 100px; height: 200px; padding: 5px; margin: 42px; border: 1px solid #CCC; } div img {…
-
3
votes1
answer34
viewsQ: Clear body keeping only 2 elements
I need to delete everything from body, except for 2 items. I tried the ways below but none worked: body > *:not("div#pedidosRelMensal, h1.resposta"){ display: none; } body >…
-
-1
votes1
answer44
viewsQ: take field name in query and popular other!
I’m doing a search at the bank. On the table, I have 6 dates: data1, data2, data3, data4, data5 e data6. I’m sweeping these dates to find out which one matches the current month. This is already…
-
-1
votes1
answer194
viewsQ: Create Apache Vhosts on Windows: Does not exceed htdocs
I’m following a tutorial on the net teaching to create Virtualhosts on Apache in Windows environment Man http-vhosts.conf <VirtualHost _default_:80> DocumentRoot "${SRVROOT}/htdocs"…
apacheasked Carlos Rocha 1 -
-2
votes1
answer40
viewsQ: slider effect does not work with jQuery
I have the following structure: <body> <div id="topo"> <section class="topo"> <div> <ul id="menuTopo"> <li><a href='#alvo'>Link</a></li> ... I…
jqueryasked Carlos Rocha 1 -
-2
votes1
answer81
viewsQ: class does not load outside of require using autoload
I have the page below: <?php require_once '../config.php'; require_once 'config.php'; ?> <!doctype html> <html> <head> <meta charset='utf-8'> <title><?php echo…
-
1
votes1
answer993
viewsQ: Moment getting the value of the previous month, even after adding one month
I’m trying to work with the Moment js. var data = moment("2019-08-17", "YYYY-M-D").add('months', 1); alert(data); dia = data.date(); mes = data.month(); ano = data.year(); The alert(data) gives me…
-
2
votes2
answers75
viewsQ: text superimposing the before
li#tel::before { position: absolute; content: ''; background:…
-
-2
votes2
answers267
viewsQ: @keyframes does not work
have a function jQuery which adds to a div the class below: .brancoTransparente { animation: cor; opacity: .9; transition: all .3s; } .brancoTransparente a { color: #000; } @keyframes cor{ 0% {…
-
-3
votes1
answer93
viewsQ: .htaccess does not accept file for 403 error
I did so in mine .htaccess ErrorDocument 403 /403.php But gives the error 403 rather than display the page of error! If I do: ErrorDocument 403 403.php That is, in/ before 403. Text appears 403.php…
-
0
votes2
answers100
viewsQ: CSS -> DIV content on ::after content
on the site I’m trying to develop, https://fielcard.net.br/ In the middle there’s a section of frequent questions and I have the following structure: $( 'body div#duvidas > section.duvidas >…
-
0
votes1
answer45
viewsQ: Centralize div without width on a display: flex
I have the following structure: <div id="peca" class="cinzaClaroBB"> <section class="sessao peca"> <div> <img src="folder.jpg"> <img src="cartao.jpg"> </div>…
-
-1
votes1
answer51
viewsQ: Error passing Javascritp to jQuery onScroll
How I can convert: window.onscroll = function (){ var elemento = document.querySelector("div#valores > section.valores > ul"); elemento.classList.add("animated");…
-
1
votes1
answer31
viewsQ: jQuery = Focus with this
In: var form = $('body div#contato section.contato'); if ($(form).find('#nome').val()=='') { alert ('Preencha nome'); $(this).focus(); return false; }; What is the correct way to call the this? he…
jqueryasked Carlos Rocha 1 -
2
votes1
answer386
viewsQ: Dynamically scale header height
So I have the following structure HTML <div> <header>Esse é o cabeçalho</header> <article>Esse é o artigo que vem sobre do cabeçalho</article> </div> I’ve got…
-
0
votes1
answer180
viewsQ: ::active + CSS is not working
div.duvidas2 > div > div::active + div.duvidas2 > div > article { display: block; } div.duvidas2 > div > article { display: none; } <div class=duvidas2> <div>…
-
0
votes1
answer60
viewsQ: Change content of ::after
I have the following structure: <div class=duvidas> <div> <span>Titulo</span> <div style='display: none'>Texto</div> </div> </div> The goal is click…
-
1
votes1
answer54
viewsQ: pseudo element after does not go right
I made a span and gave width to him of 800px. I put a small text in it and added a after in the hope that this afyer is the final meaning of span glued to the right. But it stayed glued to the text,…
-
-1
votes1
answer34
viewsQ: DIV does not respect dimension after mouse-over
I’m with that code. The idea is to get div.topo accompany to width of Browse in up to 90% limited á 1440px when it stops tracking and keeps the width fixed. That part is OK. The problem is that when…
-
1
votes1
answer408
viewsA: Error redirecting to https UOL Host
For those interested can. For me this solution worked in parts. # Redirecionar para HTTPS WC RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^…
-
-2
votes1
answer408
viewsQ: Error redirecting to https UOL Host
I have a website hosted on UOL HOST. I’m setting up a .htaccess in the hope that 2 things will happen: A) All access by http be converted to httpS B) Any and all access (Links existing and…
-
0
votes1
answer66
viewsQ: Center a single div on body with Dsplay: Flex
I have the body and a div with width: 320px; I would like to focus on body that is flex. But look at that, NAY I want to center your content. Would like to centralize the very div in body. body {…
-
1
votes1
answer92
viewsQ: Reduce UL padding during scroll
How do I make to reduce the padding of UL fixed of 40px for 20px after scrolling the screen on 10px only using CSS? I tried as below but nay worked: html, body { margin: 0; padding: 0;…
-
1
votes1
answer211
viewsQ: How to fix a content or a background to a div
I’d like to do with that div roll along with the page but its contents or the contents of a before that would be in the case of the image (if applicable), it would be fixed so that the content (or…
-
-3
votes1
answer34
viewsQ: $_SERVER['HTTP_HOST'] generating 2 times
I’m having a hard time. I’m in the localhost and I want to take the path of website to advance a link of a image $uri = $_SERVER['HTTP_HOST'] . '/mvc_crud_pdo'; $iconeTransporte =…
-
-1
votes1
answer129
viewsQ: z-index does not work
/* CSS Document */ @import url('http://fonts.googleapis.com/css?family=Open+Sans'); *, *:before, *:after, *:active, *:hover { font-family: 'Open Sans'; margin: 0; padding: 0; /*border: 0;*/ outline:…
-
0
votes2
answers66
viewsQ: block with css on the mouseover
In CSS has way of passing the mouse on an element, do display: block in another as is done in JS? The object is that I have the following structure: <ul class="menuAdmin centralisado">…
-
0
votes1
answer177
viewsQ: create Javascript function for multiple ids
$(document).ready(function() { $('div#bloqueioSelect').click(function() { if ($('div#bloqueioSelect ul').is(':visible')) { $('div#bloqueioSelect ul').css('display', 'none'); $('div#bloqueioSelect…
-
-2
votes2
answers99
viewsQ: Arrow in select with div and jquery
$( document ) . ready( function () { $( 'div#bloqueioSelect' ) . click( function () { if ( $( 'div#bloqueioSelect ul' ) . is( ':visible' ) ) $( 'div#bloqueioSelect ul' ) . css( 'display', 'none' );…
-
1
votes1
answer35
viewsQ: UL display failure at the time
I have a UL and its li’s has 50px of height. In this case the height of UL must obey these 50px Turns out in some li’s I have images in them and this is causing a augmentation in height of li. The…