I’m now up to binding onclick with the scrollbar.
Well, that mark-up can work, but I think it could benefit from some changes.
If the only thing that will be going inside the containing <div>
is the <ul>
list, you don’t really need the <div>
, you could style the <ul>
directly. Examples of pages that have what I would consider to be extra tags are certainly not hard to find. eg.
<div>
<div>
<div>
<p>lorem ipsum dolor ...</p>
</div>
</div>
</div>
but I like to keep things as simple as possible to keep the number of places I can mess up to a minimum.
Then there’s the <h3>
vs <span>
tags. Both can be styled but I have difficulty considering a level three heading to be the best possible choice to use in a list with links as their partnering content. It reminds me of when I first started writing HTML, didn’t really understand CSS all that well, and used heading tags so I could take advantage of their default style. Since then I have become a little bit better at understanding CSS and I try harder to use tags for their semantic meanings.
As for a “scrollbar” firing an event, scrollbars are part of a browser’s chrome. I think you are looking for the container elements “scroll” event.
While it is certainly possible to further develop the list in isolation from the rest of the page, you said you wanted to “marry” the list to the “image” and “links” <div>
s. I have found that working on JavaScript before I have the HTML and CSS ironed out results in “extra, wasted” work and I much prefer to “start at the beginning” - the HTML
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.