Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12820 closed bug (notabug)

Issue in syntax selector.

Reported by: skumaresh007@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

Dear JQuery Team,

We are currently using jQuery version 1.4.1. We are going to update the latest version of jQuery, but we are getting some issue in jQuery syntax ( selectors ).

In jQuery 1.4.1

<input type="text" name="firstName" id="firstName" />

<script>

console.log(jQuery("[name=firstName]"));

</script>

In Above code, I am trying to get input element of first name and its working fine.

<input type="text" name="First Name" id="First Name" /> <script>

console.log(jQuery("[name=First Name]"));

</script>

In Above code, I am trying to get input element of first name (name contains space) and its also working fine.

In jQuery 1.8.2

<input type="text" name="firstName" id="firstName" />

<script>

console.log(jQuery("[name=firstName]"));

</script>

In Above code, I am trying to get input element of first name and its working fine.

<input type="text" name="First Name" id="First Name" /> <script>

console.log(jQuery("[name=First Name]")); not working. console.log(jQuery("[name='First Name']")); working fine.

</script>

In Above code, I am trying to get input element of first name (name contains space) and its not working.

In jQuery 1.4.1

var qXHR = jQuery.ajax({url:url,cache: false,type:"POST",data:args});

qXHR.onreadystatechange = function() {

if(qXHR.readyState == 3){

do some thing

}

else if(qXHR.readyState == 4){

do some thing

}

}

In above code working fine in jQuery version 1.4.1 but above code not working in the latest version.

Please fix it as soon as possible.

Thanks, Kumaresan.

Change History (2)

comment:1 Changed 7 years ago by anonymous

You always need to quote attribute values in selectors.

comment:2 Changed 7 years ago by Rick Waldron

Resolution: notabug
Status: newclosed

See above.

Note: See TracTickets for help on using tickets.