jQuery: The Write Less, Do More JavaScript Library

Ticket #2288 (new enhancement)

Opened 6 months ago

Ease of use enhancement for .show("slow")/.hide("slow")

Reported by: DiscoNova Assigned to: anonymous
Type: enhancement Priority: minor
Milestone: 1.2.3 Component: fx
Version: 1.2.2 Keywords:
Cc: Needs: Review

Description

As per ticket #2041, it's impossible to use the "speed enabled" show/hide -functions on table-rows (and actually a few other elements whose native display-mode is not "block"), why even offer the possibility of shooting yourself in the foot? When a developer erroneously attempts to do something like that, why not just silently disallow it; a change could be made (for example) by changing this:

  show: function(speed,callback){
    return speed ?
...
  hide: function(speed,callback){
    return speed ?

...into this:

  show: function(speed,callback){
    return !this.is("tr,td,th") && speed ?
...
  hide: function(speed,callback){
    return !this.is("tr,td,th") && speed ?

The reason for this suggestion is that when the display-mode is changed from the native ("table-row" for TR, "table-cell" for TD, etc.) into "block", there are some unwanted side-effects in the rendering engines that could propably cause some mayhem in the long run.

Attachments

Note: See TracTickets for help on using tickets.