Posts by Chun • 7,440 points
183 posts
-
4
votes1
answer178
viewsA: How to use . toggle() to exchange animations
That’s because you’re adding 250px positive in the second .animate() that makes the animation alternate, while you should make the animation come back to left:'0' instead, which is its initial…
-
2
votes2
answers13641
viewsA: Deletion of repeated words using Notepad++
There is the tool to find and also replace words that can somehow do this. Clicking Control + F, it will open a window with several options: Find | Replace | Find in Files | Mark Clicking on the tab…
-
2
votes1
answer556
viewsA: Block body scroll when Lightbox is open, but be able to scroll Lightbox content
A quick approach would be to create a class with overflow:hidden; responsible for removing the scroll of body: .lightbox-open {overflow:hidden;} Where this will be added to the tag <body> and…
-
3
votes2
answers4089
viewsA: How do I put the "like" and "share" button for each blog post?
This is because you are setting the link to your blog homepage as the link to be liked/shared in the code that generates that button: data-href="http://enchendoacaixa.blogspot.com.br/" In order for…
-
2
votes1
answer969
viewsA: Is it safe to use Timthumb?
Timthumb does have security vulnerabilities, the developers themselves mentioned this once (I think it was their own blog/site) and linked that was the reason they stopped continuing their…
-
0
votes1
answer2177
viewsA: Hide folder from URL
Method A If you want to prevent the 'skeleton' of the folder site is displayed when accessing the folder directly from the URL (meusite.com/site), as in this example below: /site • imagens • js •…
-
2
votes2
answers97
viewsA: Display a DIV when you see that it has a background color
If using jQuery is an option, you can do it as follows: var containerDiv = $('.container'); if (containerDiv.css('background-color') == 'rgb(255, 177, 0)') { $('.mostraDiv').show(); } else {…
-
2
votes1
answer294
viewsA: Tinymce - How to turn it into a required field?
To do this I think it is not enough to just add one required in HTML. You’d have to create a code something like this: $('#enviar').click(function(){ if($('.requerido').val() == ''){ alert('O…
-
4
votes1
answer3335
viewsA: How to change the title of wordpress blog directly in php?
You must not have found the tag <title> in the header.php because this should probably be implemented through <?php wp_head(); ?>. If you search the file header.php within the tag…
-
2
votes1
answer227
viewsA: How to have the same margin for all lines of text:
Instead of attributing the margin-left: 30px; for the tag <b>, assigns to the <p> which is the tag that contains all the text. p { margin-left: 30px;} When defining b { margin-left:…
-
2
votes1
answer246
viewsA: Add Players in script code
I thought you already had solved this problem. To add support for other video platforms, create a class for each platform type for example - dailyMvideo and adds a function click() for each of the…
-
1
votes3
answers639
viewsA: Align 4 Ivs always horizontally, with size proportional to screen size
You can do it this way: #listaHorizontal { list-style-type: none; margin: 0; padding: 0; width: 100%; display: table; /* Transforma a div numa tabela */ table-layout: fixed; /* Utiliza o algoritmo…
-
4
votes3
answers490
viewsA: Displays and hides contents in list form. with Javascript
Although I get it, what you want to do is add the video right below each title when clicked. I created this script, in which it creates the element that contains the video and shows it just below…
-
2
votes1
answer2187
viewsA: How to pass a text as a parameter to a Javascript function?
If you are trying to get the name applied to the button in the example of your question, you can do this using document.getElementById("meuBotao").innerText; as follows: function alteraNome() { //…
-
0
votes1
answer294
viewsA: Onclick generate a new element every click, instead of resetting the first
You can do this using the .append() jQuery, as follows: $('#editavel').append('<div class="ui-widget-content, draggable">Arrastar<div id="divv" class="" contenteditable="true" >Este é um…
-
2
votes1
answer408
viewsA: Float problem
To avoid this and other kind of problems with float, always make sure to use a clear:both; every time you finish floating elements. For that you can create a class specifies to do this "cleaning" by…
-
0
votes2
answers422
viewsA: Position Absolute is not working
I don’t know if I got it right, but from what I understand, you want to make three lists, whose navigation buttons - Latest, + Read |, + Commented |, + Voted` of the 3rd widget at the bottom of the…
-
1
votes2
answers697
views -
8
votes2
answers596
viewsA: How to animate the display of dynamically sized elements with CSS only?
Some time ago I created an article on this same subject in my Blog. You can do this using the max-height as follows: .box { max-height: 0; transition: max-height 2s;} .escondido:checked + .b {…
-
3
votes2
answers853
viewsA: Make shapes with CSS
You can do it this way using the property transform: rotate();: .container { height: 180px; width: 100%; border: 1px solid #000; position: relative; overflow: hidden; } .shape { background: #000;…
-
2
votes1
answer322
viewsA: How to list only the highlighted image of a post?
You can do it this way: <?php $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true); echo $thumb_url[0]; ?> Make sure you change the…
-
1
votes1
answer103
viewsA: How to make animation changing videos with mouse click
You can do it this way: function mostraDiv(num) { document.getElementById('div1').style.display='none'; document.getElementById('div2').style.display='none';…
-
2
votes2
answers216
viewsA: jquery mascara formulario
If you want to get the value from inside the .cpfcnpj, you have to use .val(). By doing this - $('.cpfcnpj').length;, it returns the number of elements with the class .cpfcnpj. var tamanho =…
-
7
votes1
answer750
viewsA: How to change the class of an element - Font Awesome
You can do it this way: $('.minhaClass').click(function(){ $(this).find('i').toggleClass('fa-minus fa-plus') }); .minhaClass{cursor:pointer;} <script…
-
4
votes2
answers349
viewsA: Change Bootstrap icon in Mobile version
The best and simplest way to do that is to create your own icon where right arrow by default in Desktops and when the screen is smaller (i.e., in the mobile version) the icon will become the down…
-
1
votes1
answer1256
viewsA: Woocommerce - Open product page only if the user is logged in
The syntax used to show something only if the user is logged is: <?php if ( is_user_logged_in() ) { ... } ?> Reference: Function Reference/is user logged in Here are also these two plugins,…
-
3
votes3
answers4002
viewsA: Div one on top of the other
You can do it this way with jQuery: $(document).ready(function() { var divPai = $("#idPai"); if (divPai.height() <= 200) { divPai.addClass("umaColuna").removeClass("duasColunas"); } else {…
-
2
votes1
answer36
viewsA: CSS3 Gradients - Doubt about syntax in Firefox and IE
The correct syntax is as follows: .barra-menu{ background: -webkit-linear-gradient(top, transparent, rgb(0, 0, 0)); /* Para o Safari 5.1 to 6.0 */ background: -o-linear-gradient(top, transparent,…
-
1
votes1
answer839
viewsQ: How to set a time to automatically shut down your computer with a Batch file
I am following a tutorial from the site Super User of the network of Stack Exchange sites, with the idea of programming my computer to shut down by passing X time, after we have run or double click…
-
6
votes1
answer1110
viewsA: How to create "grid" with floating elements similar to Pinterest
To do that you have to use the property column-count instead of the float:left; as in the example below. This property divides the content into a div where this property is assigned, in several…
-
1
votes2
answers4017
viewsA: Load Javascript function when opening the page
You can do it this way: $(document).ready(function() { $("#link").tooltip({ show: {duration: 800} }); $("#link").trigger('mouseenter'); }); $('html').click(function() {…
-
5
votes1
answer5315
viewsQ: How to prevent text from being selected using CSS
How to prevent user-selected text using a CSS rule?
-
7
votes1
answer5315
viewsA: How to prevent text from being selected using CSS
To prevent a user from selecting a text, we can do it as follows with the code below: .naoSelecionavel { -webkit-touch-callout: none; /* iPhone OS, Safari */ -webkit-user-select: none; /* Chrome,…
-
2
votes2
answers9986
viewsA: Spacing between specified columns in the table without creating <td> a false
You can do this using the following "Hack": th { border: 5px solid transparent; background-clip: padding-box; } You could just use the border: 5px solid; and add a color to it, but let’s say that in…
-
2
votes2
answers4294
viewsA: Line break of select options that contains a very long value
No, this cannot be done. However, you can always choose to use this solution alternative to add a title at the option: <select> <option value="1" title="This is my lengthy explanation of…
-
2
votes1
answer291
viewsA: Responsive bootstrap
You have here several examples Bootstrap Navigation Bars to suit your needs. In this case what you are looking for is the following structure: <nav class="navbar navbar-inverse"> <div…
-
2
votes1
answer172
viewsA: Image spacing with HTML5
These margins are added by the browser, depending on it. For example Google Chrome adds: figure { display: block; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 40px;…
-
4
votes1
answer2452
viewsA: Swap/Edit word already translated in Wordpress
The easiest way to manage translations, either to edit or create new translations, is by using the plugin Loco Translate. The plugin Loco Translate allows you to edit files PO and POT through your…
-
0
votes2
answers206
viewsA: Place ID inside a TITLE
It is not possible to put a id or class within a title, or even HTML. The attribute title="" serves only to specify additional information to a single element. However if your intention is to…
-
3
votes2
answers5442
viewsA: Change menu color in page scroll
The code is correct, you need to add the styles to this class .teste2, or add jQuery library: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> I…
-
4
votes1
answer188
viewsA: How to keep a rotated text centered on a dynamic height div?
You can do it this way: body {margin: 0;} .container { position: relative; } .left-panel { background-color: #DDD; min-height: 110px; height: 100%; width: 40px; position: absolute; left: 0; top: 0;…
-
4
votes3
answers4953
viewsA: How is the module math calculation (%) done in Javascript?
Just to complement Both the answers of Maniero and mgibsonbr are quite good and complete, thanks for the clarification and additional information that instructed me more =) . While researching…
-
12
votes3
answers4953
viewsQ: How is the module math calculation (%) done in Javascript?
I am trying to use "reverse engineering" to understand what is the calculation done by the module (%), but I’m not getting it and I wanted to understand and clarify, to make this part clear, before…
-
2
votes1
answer12835
viewsA: Show "Wait..." message while the page loads in full - MVC jQuery
The correct method would be - .hide(); and not .show('hide');. Popup isn’t working because you’re basically telling him to open it, and then close with the .hide();. To close the Popup after the…
-
1
votes2
answers3198
viewsA: Completely customize the Youtube player
To fully customize the Youtube player, you need to make use of Youtube API, and then you would have to program a lot of Javascript code that will be a long and truly extensive process as you can…
-
5
votes2
answers463
viewsA: Toggle text and class of a link when clicked - jQuery
I think it would be best to do this in one function using one if/else and pointing the click to a class (that in this case could not be a id as this will be used more than once) that is not modified…
-
1
votes2
answers514
viewsA: Padding Bottom does not work
That’s because you’re adding position:absolute; à div main listing (#source), when this is not necessary to be implemented. As you’re already adding position:fixed; at the #top-bar and to the…
-
3
votes1
answer64
viewsA: Mouse Scroll Lock
You can do it this way with Javascript: document.getElementById('meuID').onwheel = function(){ return false; } body {height:1000px;} #meuID { width:150px; height:200px; border:1px solid #000;…
-
4
votes1
answer1343
views -
4
votes1
answer1864
views