开发者

Tabbed javascript widget for a Rails app

A user registers on our Rails app and they're given javascript to embed a widget in their website. The widget has a tabbed interface, like the JQuery tabs http://stilbuero.de/jquery/tabs_3/. iFrames have been tested, but the widget form factor and cross-domain policy negates the use of iframes. The widget is very dynamic and will often update the DOM with new content - and because of cross-domain policy, it looks as though JSONP is necessary.

I understand that 'widget.js.erb'开发者_JS百科 needs to create the widget layout, reference a stylesheet, render the tabs, etc - but once a tab is clicked, how does the widget request the content from the Rails app and render it in the DOM?


jQuery Tabs hold HTML divs much as a normal HTML page does. Think of each tab as simply hiding the HTML content in other tabs that without jQuery Tabs would be displayed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜