Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

how to check if an element starts with class in jquery

/*SM*/

//Try using :
$("[class^=info_]"); //Classes Starts with  info_
$('[class*=info_]');  // Classes which contains info_

//instead of hasClass
if($('label').is('[class*=info_]')){} //Contains
//or
 if($('label').is('[class^=info_]')){} //Starts with
Comment

PREVIOUS NEXT
Code Example
Typescript :: typescript style type 
Typescript :: set array of objects in localstorage 
Typescript :: typescript constructor assignment shorthand 
Typescript :: adonis where has 
Typescript :: using chai in typescript 
Typescript :: how to print list as matrix in python without brackets 
Typescript :: It is not possible to unreserve more products of ... than you have in stock. odoo 
Typescript :: linux copy contents of file to clipboard 
Typescript :: angular connexion 
Typescript :: pandas add a value counts column to dataframe 
Typescript :: get slope from two points 
Typescript :: how to see constraints in postgresql 
Typescript :: email validation pattern angular 
Typescript :: move items from one log to another typescript 
Typescript :: change execution policy 
Typescript :: notificationManager has not been initialized 
Typescript :: hthe cmd to create tsconfig.json 
Typescript :: angular navigate using component 
Typescript :: get angular width 
Typescript :: react native typescript 
Typescript :: tweepy stream tweets from user 
Typescript :: angular reload component 
Typescript :: react ts createcontext 
Typescript :: find a value in list of objects in c# 
Typescript :: how to erase elemts accoding to index c++ 
Typescript :: typescript remove an item from array 
Typescript :: key value typescript 
Typescript :: list all commits before rebase 
Typescript :: class typescript constructor 
Typescript :: typescript object key enum 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =