Make $(this) ID in class

I'm trying to set the this of which is an ID to the same string but in class.

For example:

$("#FirstBox").click(function () {
    $('.FirstBox').trigger('click');
});

Instead of typing .FirstBox, how can I set a variable so it's $(this) in class?

Answers


$('.' + this.id)


Need Your Help

VS SchemaCompare: Making Table Updates

sql-server visual-studio visual-studio-2010 schema-compare

Does anyone know how the SchemaCompare in Visual Studio (using 2010 currently) determines how to handle [SQL Server 2008R2] database table updates (column data type, optionality, etc)?

Remove multiple occurrence except for particular values?

python algorithm list find-occurrences

I have a list of lines of text: textlines which is a list of strings (ending with '\n').

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.