Please login or register.

Login with username, password and session length
Advanced search  


Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: 1 2 [3]

Author Topic: JS a href="#" - hum hum  (Read 6439 times)

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: JS a href="#" - hum hum
« Reply #30 on: March 22, 2011, 03:42:11 pm »

Hi Fred.
... I found a dirty way in december to make it (a simple "Toggle" script) but not very convenient with the expected behaviour in HTML5.

HTML5 doesn't, as far as I know, suppose any behaviour. Summary, as the operative example here, can be both visible initially and hidden initially, and since almost no current browsers have a built-in hiding mechanism for this element, the open/closed rules included in the spec for this element aren't operational yet. When they are, in more than one major browser, then we won't need to use scripting at all for the summary element. But ... that is not now. Again, this is as far as I know. Things might have changed.

Personally I don't see why it needs to be hidden initially, but I am fully aware that opinions differ on that point.


  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: JS a href="#" - hum hum
« Reply #31 on: March 22, 2011, 04:26:14 pm »

Perhaps it's better to inject the <a> element through the script, but I'm clinging to the 80-20 illusion here...

Right, but with me and conversations with others using their mobile more to browse the web, I can see the pains of that 80-20 rule (not your example of course, but it would helpful to correct it).  On my old Blackberry it was a pain to even let JS load up, so turning it off was the best option... Not so much with my Android or my Ipod Touch, but few sites are unbrowsable with JS enabled/disabled. Also with Android user base increasing, I can't help to think about those on prepaid that may forgo JS as well due to additional data being loaded, etc... Another thought.

Pages: 1 2 [3]