Questions tagged as 'jquery'

2
answers

Catch all the src contained in the document and transform into array in jquery

Assuming I have 10 img elements on my page. I would like to create an array that has as content the attr-src of each img contained in that same page. How do I accomplish this task?     
asked by 29.08.2015 / 08:15
1
answer

Feed hidden field by click on the column of a table

This is my jQuery that mounts HTML in my cshtml. $(data.resultado).each(function () { str += '<tbody>'; str += '<tr>'; str += '<td>'; str +=...
asked by 08.05.2014 / 20:32
2
answers

problem converting text to lower case

I have created a function that converts the text to lowercase inside the input, the problem and that when I inform an input with value, and having to change something the cursor jumps to the end. Does anyone know how to solve this? My code:...
asked by 23.02.2016 / 19:47
1
answer

Problem with auto focus

I've created a custom input, and I can not make the autofocus work. Follow the code: $('.form_campos').on('focus blur', function(e) { $(this).parents('.form-group').toggleClass('focused', (e.type === 'focus' || this.value.length &g...
asked by 29.02.2016 / 15:39
1
answer

Uncaught SyntaxError: Unexpected token

I get this error in the 3rd line of this code to make a lightbox appear with an image by clicking on it, using fancybox 2, with CakePHP. I can not understand why this is happening, can someone help me? <script type="text/javascript">...
asked by 03.04.2014 / 15:33
2
answers

Preview image before uploading + ImageResizing.net

In a few minutes looking for a way to show an preview of an image before uploading it, I found the great solution: $("##ID DO INPUT FILE##").change(function (event) { var reader = new FileReader(); $(reader).load(function (event) {...
asked by 04.04.2014 / 20:49
1
answer

.append mismatch with length

I have a script to generate images, and the images are generated with .append . $(".fotos").append("<img src='" + size +"'/>"); The problem is that append does not generate the image in the source code, they are generated from t...
asked by 02.02.2014 / 19:25
1
answer

Add automatic content exchange

I need to find a way to exchange the data-id and data-content information to .number and .passo automatically, without having to depend on hover (). I need to keep both the automatic form of this exchange as a presentation and hover () if the...
asked by 30.05.2014 / 05:49
1
answer

Load 3 boxes at a time by clicking the button

$(".box-hidden").slice(0, 3).show(); $("#loadMore").on('click', function (e) { e.preventDefault(); $( ".box-hidden:hidden" ).first().fadeIn( "slow", function showNext() { $( this ).next( ".thumb-hidden:hidden" ).fade...
asked by 15.11.2018 / 17:21
3
answers

How do I create a floating window in html?

I need a window with table contents that open when I click a link and have a close button.     
asked by 14.09.2014 / 15:49