jQuery.Gantt icon indicating copy to clipboard operation
jQuery.Gantt copied to clipboard

Cleanup: fix/simplify the construction of navigation markup

Open usmonster opened this issue 11 years ago • 3 comments

This is ugly. (...and doesn't indent well, either!)

The infinite chain of function calls seems wildly unnecessary. The element could just as easily be built using a single string of (much easier to read) markup.

We should also separate the construction of the fragment from the event binding.

usmonster avatar Aug 02 '13 15:08 usmonster

Not sure about the best way forward. I'd personally just use a HTML template (clone -> modify -> append), but it's not very "jQuery plugin"-like. I guess the motivation is to just call a function on a <div> and not have to particularly configure any DOM yourself.

taitems avatar Aug 04 '13 23:08 taitems

We could use some Template Engine like Handlebars

worenga avatar Sep 05 '13 12:09 worenga

@mightyuhu I think that might be a bit overkill, seeing as the fix is pretty straightforward and shouldn't require the use of any third-party libraries.

usmonster avatar Sep 05 '13 13:09 usmonster