Draggable() is not working in jquery?

Your using draggable which is a jQuery UI method but it won't work to drag around the columns simply by attaching it to the table header. You'll need to ultilise a helper function.

Your using . Draggable which is a jQuery UI method but it won't work to drag around the columns simply by attaching it to the table header. You'll need to ultilise a helper function: For dragtable, although the documentation says to: Add class="draggable" to any table you might like to reorder.

This is a bit simplistic to say because the developer should realise things can be created dynamically in Javascript! In other words, just simply adding the class draggable to the dynamically created table will NOT work. This is because draggable has already add event listeners after executing the init for all the tables when the DOM is ready.

Changing the class will not automatically add an event listener. If this was a jQuery plugin, it could of used . Live to attach event listeners to any dynamically created table now and in the future, but unfortunately it's not.

You'll need to attach a dragtable onto the newly created table, try: dragtable. MakeDraggable(newTable); Edit: Make sure your acting on the table element itself, not a jQuery object i.e. : dragtable.

MakeDraggable(newTable0); Fiddle: http://jsfiddle.net/garreh/64pyb.

Gary Geen....dragtable. MakeDraggable(newTable); is not working, giving error. I am very new to jquery,now I am onto helper function.

I will study helper function first and then will tell you the results. – Java_NewBie May 26 at 9:21 What error is it giving? – Gary Green May 26 at 9:27 it is giving...."table.

GetElementsByTagName is not a function". – Java_NewBie May 26 at 9:36 See update, it's because your acting on the jQuery object, yet the dragtable is expecting just the table element. You can do newTable.

Get(0) to get the table element, or just get the element by doing newTable0 -- I've provided a fiddle which demonstrates it working. You don't even need a classname. – Gary Green May 26 at 9:38 Garyyyyy...Thankyouuuuuu sooooo much, it worked :).

Its been like two to three days I have been involved in this problem. Thankyou so much. – Java_NewBie May 26 at 9:45.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions