I see a lot of websites that when someone opens the "ABOUT" page, a CSS that only stylizes that link is activated. I believe it's with JS, and that involves URL comparison, but in practice I have no idea.
Suddenly it appears to be a duplicate...
I'm a beginner and would like to know the error of this code:
var nav = $('.topo');
$(window).scroll(function () {
if ($(this).scrollTop() > 136) {
nav.addClass("fixar");
} else {
nav.removeClass("fixar");
}
});...
I have the following autocomplete that works on the 1st input, when it completes it fills the 2nd input.
The problem is that if you delete the <p> tag it does not work. Can anyone tell me why?
Follow the code:
$().read...
My code for blocking characters looks like this:
$('#nome').on('keypress', function() {
var regex = new RegExp("^[ 0-9a-zA-Zàèìòùáéíóúâêîôûãõ\b]+$");
var _this = this;
// Curta pausa para esperar colar para completa...
I want to know how to remove focus from an element when it is clicked using pure JavaScript.
I made it that way using jQuery
$(function(){
$(".btn").click(function(){
$(".btn").blur();
});
});
This served me well, but I changed s...
HTML code - JAVASCRIPT It read a txt file from the computer and puts its value into an html input
<input type="file" id="files" name="files[]" multiple />
<input type="text" required name="txtstart" style="width:150px" value="">
&...
I'm displaying on my page an image called punctuation.png , and I'd like javascript to clear the cache and display the image and repeat this every 100 milliseconds.
Is this possible? Would anyone help me with an example in javascript and htm...
When a date is selected, the user should be able to select another date within a period of one week after the date that he selected.
Here's the code I'm using:
$(".datepicker_reservas").datepicker({
minDate: 0,
numberOfMonths: [1,4]...
I would like to convert the date from the bank (2012-02-10) to Brazilian standard (10/02/2012) in the AJAX success example:
$.ajax({
type: 'POST',
dataType: 'json',
url: "crud/consulta.php",
data: dados,...
I have a report ( table ) containing user registrations using the Bootstrap framework.
Next to each record line is Edit. Clicking on this option would call the Modal window, and open the information for that record specifically.
The...