JQuery UI Portlets - Loading and Editing a Portlet Using Ajax

All,

I am trying to create an igoogle interface using PHP, MySQL and JQuery UI, and I came across jquery UI portlets:

http://jqueryui.com/demos/sortable/portlets.html

For each portlet, there is a way:

  • To specify a url and download ajax content?
  • To have an edit button, this will edit the portlet. content editing can go through URLs using ajax.

For more information, see the Edit section here:

http://james.padolsey.com/demo/tut-inettuts-with-cookies/

thank

+3
source share
1 answer

You can change the contents of portlets like this:

http://jsbin.com/imese4/2

load() .html() ( ).

$(".portlet").each(function(element){
      $(this).children(".portlet-content").load("content.php?id="+element);
});

, :

$(".portlet-edit").click(function(element){
  s=prompt('Enter your content','Content');
  $(this).parent().children(".portlet-content").html("edited:" + s);
});
0

All Articles