$(".className").click(function(){
var link = $(this).find("a").attr('href');
//output is '#myID'
var findItems = $(link '.mydiv').length;
//WRONG
var findItems = $(link + '.mydiv').length;
//WRONG
console.log(findItems);
// WRONG NUMBER
});
if someone could correct my syntax please?
suppose to be like var findItems = $('#myID .mydiv').length; but #myID should be a variable