How to find out a specific string inside a jquery array object?

Sricknight

New Member
i am having a doubt in jQuery array object.Let me describe briefly: I am having two array called brandsLink and floorLink.when user will click any link, i am storing that particular brand name inside a variable called brandName, and the variable i am checking inside the second array. if it is found then i will write some other method. i am attaching a image for reference. i think it will help.
Here is the code:$('document').ready(function() {\[code\]var brandsLink = $('.brandLinks li a[id]');var floorLink = $('#orionPlan .mapContainer area[id]');brandsLink.click(function(e){ var brandName = this.id; if(brandName == floorLink.find(brandName)){ console.log('yes both are matching.'); } else { console.log('sory.'); }});\[/code\]});
lnguE.jpg
thanks,naresh kumar
 
Back
Top