Setting the title is easy: $("#status").dialog("option", "title", "new title for this dialog").dialog("open");
Where you get that title from depends on your application. The ui argument provides a draggable property, which is probably what you are looking for: drop: function(event, ui) { $("#status").dialog("option", "title", ui.draggable.attr("title")).dialog("open"); } This would get the title-attribute from the draggable. Jörn On Mon, Aug 17, 2009 at 4:33 PM, gabexvx<sedatedandsec...@gmail.com> wrote: > > Hey guys, > > I've got a little bit of a chain of UI things going on, namely a > draggable that can be dropped on one of several droppables, which pops > up a dialog with a slider in it. What I intend to do is to give the > dialog a title from whichever droppable the user drops on. It seems > that the demo getter/setter on the jQuery UI could do the trick, but I > can't quite wrap my head around how I'd go about this. > > The code I've got looks like this right now: > > <script type="text/javascript"> > $(function() { > $("#slider-range-min").slider({ > range: "min", > value: 1, > min: 1, > max: 10, > slide: function(event, ui) { > $("#amount").val(ui.value); > } > }); > $("#amount").val($("#slider-range-min").slider("value")); > $("#status").dialog({ > autoOpen: false, > }); > $("#draggable").draggable(); > $("#droppable, #droppable2").droppable({ > drop: function(event, ui) { > $("#status").dialog("open"); > } > }); > }); > </script> > > How would people here go about it? > > Thanks a lot, > Gabe > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@googlegroups.com To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---