Questions tagged [jquery-1.6]

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

In version 1.6 the jQuery library makes a clear distinction between properties and attributes of elements adding several new functions to deal with this such as: .prop(), .removeProp().

28 questions
94
votes
10 answers

Select link by text (exact match)

Using jQuery, I want to select a link that contains exactly some kind of text. For example:

This One

"This One?"

Unlikely

I have tried this: $('a:contains("This One")') But it picks the first AND the…
Endy Tjahjono
  • 24,120
  • 23
  • 83
  • 123
28
votes
2 answers

Setting a control to readonly using jquery 1.6 .prop()

With the release of jQuery 1.6, the recommendation on SO has been to generally start using prop() where you used to use attr(). What happens when I want make an element readonly? $('.control').prop('readonly',…
ajbeaven
  • 9,265
  • 13
  • 76
  • 121
15
votes
2 answers

Move div with arrow key in jQuery 1.6.1 does not work

In JQuery 1.6.1, we can supposedly use += or -= with css() just as we can do with animate(), but this isn't working. Does anyone see a problem with the code? $(document).keydown(function(e) { if (e.which == 37) { //37 left arrow key. …
Pinkie
  • 10,126
  • 22
  • 78
  • 124
10
votes
3 answers

Disabling an element in jquery 1.6

With the release of jQuery 1.6, the recommendation on SO has been to generally start using prop() where you used to use attr(). What happens when I want to disable an element? $('.control').prop('disabled',…
ajbeaven
  • 9,265
  • 13
  • 76
  • 121
4
votes
2 answers

jquery 1.6.2 issue using .prop() for checked and disabled

Possible Duplicate: .prop() vs .attr() Please take a look at this fiddle: http://jsfiddle.net/DGzvP/ $("#test").prop({ checked: true, disabled: true }); $("#result").text($("#container").html()); You will see the output is:
Dave L.
  • 9,595
  • 7
  • 43
  • 69
4
votes
3 answers

Is there a way to select all elements with a certain property value?

I'm building a fairly simple plugin with jQuery that validates a form. When an element is assessed to be valid I run $(this).prop("valid", false); In certain instances I'm going to want to block the form from submitting if anything is invalid.…
Dormouse
  • 5,130
  • 1
  • 26
  • 42
3
votes
6 answers

Possible bug in jQuery 1.6 - $(...).attr("checked") is not working

I have two radio buttons on my form and up until I started using jQuery 1.6 the following code worked fine:
Andrey
  • 20,487
  • 26
  • 108
  • 176
2
votes
1 answer

jQuery ajax call does not launch callback when data type is 'script'

For example with jQuery 1.5.2 or smaller this code will log 'ololo' in FireBug console: $.get( 'some_url', { data: 'some_data' }, function() { console.log('ololo') }, 'script') Same with .ajax (any type of request), .post But with jQuery…
2
votes
0 answers

position().left is null or not an object (IE only)

I want to popup an image if caps lock is active. It works fine on FF and Chrome. But as almost always not on IE (8). It states 'position().left' is null oder not an object I also tried offset().left with the equivalent result I made a bin here:…
UNeverNo
  • 549
  • 3
  • 8
  • 29
2
votes
2 answers

jQuery 1.9 backward compatibility issue?

I am trying to use a jQuery plugin on my site which uses jQuery 1.6.2. When I change the jQuery version to 1.9 the plugin no longer works. I thought there was a backwards compatibility feature in jQuery. Is there any way to know/fix the code that…
1
vote
3 answers

Function not working on jQuery 1.6.x (but worked on 1.5.x)

This works in 1.5.2, but doesn't on 1.6.2. The button won't get 'enabled'. I think it has to be with the .attr How could i fix this? function checkMessageForm() { var message_chars = $("#form_dm_text").val().length; …
Santiago
  • 2,405
  • 6
  • 31
  • 43
1
vote
2 answers

jQuery 1.6.2 bind no longer functioning with drag events?

I am trying to use .bind() with 'dragenter', 'dragover', and 'drop' so I can drag a file from my desktop to my browser. Please see attached jsfiddle. http://jsfiddle.net/v82An/23/ $(function(){ function dragenter(e) { …
kidcapital
  • 5,064
  • 9
  • 46
  • 68
1
vote
3 answers

jQuery selector for uncommon tag ID

I have this tag ID, pretty uncommon: