Questions tagged as 'jquery'

2
answers

Knowing which div contains a specific class in jquery / javascript

I need to know the amount of divs that contain a specific class, I thought of looking for all the css I have in the divs, so I'll eliminate it until I find the divs with "has-error", but I can not find who exactly has it a class "has-error" H...
asked by 03.05.2018 / 19:37
2
answers

fade toggle jquery

I have a div and inside it a header (h3) and a button, I want when I press this button, change the contents of the text and the button, with a new text and a new button with a fadeOut effect for the text / current button and FadeIn pro new text...
asked by 28.12.2017 / 17:58
1
answer

How does the reverse function work in jQuery?

I created this code and am trying to do the inverse function, ie if it is closed, it opens, if it is open date. I'm having problems and I can not see anything on the console. Can you help me? ///////////////////////////////////////////// $("#e...
asked by 16.11.2014 / 16:01
1
answer

How do I get the value of a list of ckeckboxes with jquery?

I've tried the following: <input name="chklista" id="chk01" value="01" type="checkbox" />01<br /> <input name="chklista" id="chk02" value="02" type="checkbox" />02<br /> <input name="chklista" id="chk03" value="03" t...
asked by 18.12.2014 / 15:11
2
answers

Trigger event to change slider image by clicking the directional arrows on the keyboard

I'm using a jQuery slider, but I would like to improve it in Accessibility . I would like the keyboard arrows ← and right → to navigate my slider similarly to the click navigation arrows. But I would also like that when pressing the dire...
asked by 17.11.2014 / 05:23
3
answers

.length locks all code

I need to know if the user is logged in using Javascript (jQuery) to run some commands (purely aesthetic). The fastest alternative I found was creating a hidden input that is only placed on the page if the user is logged in (verified thro...
asked by 14.11.2014 / 18:00
3
answers

Add in html code via jQuery

I'm trying to add an HTML code to my HTML via jQuery, while any text works, already with a non-bootstrap tag For example: $(function($){ $('#enviar').click(function (e) { var linhas = $('#linhas').val(); var plantas = $('#plantas')...
asked by 23.11.2014 / 00:59
2
answers

Check if checkbox is selected in the input

I would like to trigger a direct javascript event in the input of type checkbox when it is selected. For example: <input type="checkbox" isSelected="call()"> Note: I do not want to make a script.     
asked by 21.02.2018 / 21:24
2
answers

How to add css to all elements whose id contains "..."?

I have several elements whose id contain, for example "elem", can be "% elem" or "elem%", can have characters before the String elem as before or before and then ("% elem%"). And I would like to add all the elements that css with jQuery. How ca...
asked by 21.02.2018 / 11:54
1
answer

Picking positions of a word within a text

I have text and want to get the initial positions of a specific word in all occurrences within that text. For example, I have the following text: maria gosta de joão. jose gosta de maria. maria gosta de joao e jose. Note that the word " mar...
asked by 16.02.2018 / 19:20