Closed terrymun closed 8 years ago
Hi Terry,
You're absolutely right, I changed the IDs to Classes. http://rawgit.com/calipho-sib/sequence-viewer/master/examples/index.html (You might need to clear the cache and refresh the page)
Thank you for your contribution ! :)
Cheers,
Mathieu
Thanks for the quick fix! :+1:
Just my two cents: would it make more sense to use classes instead of IDs? This would be very helpful in certain use cases where there are multiple instances of Sequence Viewers initialised on a single page. In this scenario, all instances will contain HTML elements of an identical ID,
#sequenceHeader
,#sequenceBody
,#scroller
…just to name a few, and that is semantically invalid.Usually this does not throw any error of sorts, but when attempting to manipulate specific instances with JS results in undefined behaviour, since the
documentQuerySelector
(or jQuery's$()
selector) will be unable to target a specific instance due to duplicate IDs.