Questions tagged as 'jquery'

3
answers

Opacity according to Page Scroll

I have the following complication: $(window).scroll(function() { $('ID').css('opacity', parseInt(1 - ($(this).scrollTop()/100)*1)); }); In this code I can put the opacity: 1; when the scroll is at the top and when spinning only 1px it a...
asked by 20.10.2016 / 23:59
3
answers

Include link if it is first element

I have a menu with four items. The menu is manageable, not manual via HTML. I want to modify a link in the first Menu item, how can I do this with Jquery? I do not even know how to look to do this. For example: <li class='classe' oncl...
asked by 11.03.2014 / 17:57
3
answers

Automatically click when opening site

Yesterday I did this question , and everything went well. What I need is that when I open the site directly on the link www.mysite.com/test it open exactly where the "test" is, I used scrollTop for navigation. So, I think the ideal is to be...
asked by 18.09.2014 / 18:39
3
answers

Remove key pressed in an input text

I have the following scenario: A input text that comes with a certain value / text from the DB but that the user should not be able to edit. To do this, pressing a key on input will delete that same character. What I'm doing is:...
asked by 11.03.2014 / 12:49
2
answers

How to add a DIV to every 3 paragraphs (p)

Well, what I want is simple. I need to add one div every 3 paragraphs. Remember that these paragraphs will be in another div (in case it would be the content div). It is similar to that of site , where it is found the announcement. It wou...
asked by 19.04.2016 / 21:47
2
answers

How can I not select other checkboxes when selecting a checkbox? [duplicate]

I have these 3 checkboxes <td style="background-color: #D6FAFA"><input type="checkbox" name="box2" id="ok" /></td> <td style="background-color: #D6FAFA"><input type="checkbox" name="box2" id="nok"/></td> &...
asked by 21.07.2016 / 17:10
3
answers

Allow Select PDF only in JS

I would like to know how to do that by choosing the file to upload it to filter by native .pdf extension html or by JS, Jquery. Using the type="file" it brings all the files. <!DOCTYPE html> <html> <body> <h1&g...
asked by 03.08.2018 / 22:29
2
answers

Dropdown animated with jQuery

I'm developing a website, and in its header it should contain a Dropdown that appears when giving a hover in the header link, preferably with the animation of it popping up, however it has a bug that when you go to the dropdown it tries to hide,...
asked by 13.11.2018 / 13:36
2
answers

Limit Input to a Range of Values

I am creating a small shop that will sell shirts for an event and the sale of the shirts will be limited to a maximum of 4 shirts per person, so I need that in the field where the number of shirts that the person wants to buy is defined is limit...
asked by 18.04.2015 / 18:05
2
answers

How to share functions between javascript files?

I have two JavaScript files. file1.js function teste() { alert("fui chamado!"); } In file2.js I would like to have access to the teste() function of file1.js without having to reference within HTML . Home Is th...
asked by 02.06.2015 / 23:03