Issue in jQuery

Issue in jQuery

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.





Thanks,
Kumaresan.