How to use variable in this $.each selector

How to use variable in this $.each selector

Hello,

Most times I feel so stupid when I post these types of questions, But, how do I use a variable in this $.each selector statement? Ive tried for two days and havent been able to get it ...The variable is the $arr ...

var $action = $('form').attr("action");                    
var $arr = $.trim($action.split(".")[0]);                  
$("#ccsmenu a[href*='+ $arr+ ']").each(function (idx) {  

Sorry for being such an idiot