5.3. The jQuery UI DialogIf you are adding a map to a larger website, and you are already using jQuery UI for interface components, it makes good sense to create “popups” for your map that will be integrated with the style of the rest of your site. The jQuery UI dialog function provides a flexible way to produce themeable dialogs that serve a variety of purposes. The previous example <openlayers.integration.jqui-slider.example started with existing markup and used the jQuery function to select and modify DOM elements. The jQuery function can also be used to create elements given a string of HTML. The code below creates a <div> element and turns it into a modeless dialog: jQuery("<div>Hello!</div>").dialog();
This technique is used in the tasks below to create dialogs populated with information from a feature’s attribute values. 5.3.1. Displaying Feature Information in a DialogTasks
Bonus Tasks
|
|
来自: LibraryPKU > 《Web》