Bhargavi
Bhargavi

Reputation: 851

What is the purpose of using ## in jquery

What is the purpose of using ## in jquery

if($('##hidetxt').val().length ==0 ){
                $("##hidetxt").val("firstname Asc");            
            }

What is the difference of using single # and double ## in jquery

Upvotes: 3

Views: 67

Answers (1)

Rahul Tripathi
Rahul Tripathi

Reputation: 172458

I think there is nothing called ## in jquery. It would result in Syntax error.

However # in jquery specifies to select elements by their ID's. So if you write #row then it would match

<div id="row">

Check out this Jquery reference.

On a side note:-

Hash # and dot . are the same as they are in CSS

Upvotes: 1

Related Questions