jQuery .filter HREFF with ID

Hey i want to select HREF and ID:

I have

.filter('[href="#"]')

this select HREF but how do both?`

I have for ID something like:

$(this).attr('id')

How can select both include with .filter?

Thanks

Only can be with + var + ?

Hi,

Please share your code and the link to the exercise