Where can I ask questions related to programming logic and what is really happening behind the scenes.

For example: the jQuery `.focus()` method is supposed to work with form elements only, but its even working with div tags. I want to know how this is possible, and what the logic behind this is.

Would these types of questions be appropriate for Stack Overflow? Or is there another site where I should ask?