When implementing the collapse effect in Bootstrap, why do buttons need to refer to the data-toggle=collapse
class and the data-target=#collapseExample
ID of the panel for the effect? Wouldn't simply targeting the ID be enough to toggle its state?
Could it be that data-toggle
specifies the type of effect to be used, hence it targets the panel accordingly?