Ah, I found out I had to use LIVE
So, replaced

$(".portlet-header .ui-icon").click(function() {
$(this).toggleClass("ui-icon-minusthick");
$(this).parents(".portlet:first").find(".portlet-content").toggle();
});

width

$(".portlet-header .ui-icon").live("click", function(){
       $(this).toggleClass("ui-icon-minusthick");
$(this).parents(".portlet:first").find(".portlet-content").toggle();
     });

2009/9/25 Snader <[email protected]>

> I was using this http://jqueryui.com/demos/sortable/portlets.html
> example as a start for some experimenting. I made a <a href="#"
> id="add">add</a> link with the following code
>
> $("#add").click(function() {
>
> $(".column").prepend("<div class=\"portlet ui-widget ui-widget-content
> ui-helper-clearfix ui-corner-all\"><div class=\"portlet-header ui-
> widget-header ui-corner-all\"><span class=\"ui-icon ui-icon-plusthick
> \"></span>Feeds</div><div class=\"portlet-content\">Lorem ipsum dolor
> sit amet, consectetuer adipiscing elit</div></div>")
>
> });
>
> This adds a new 'portlet' to each column. It looks nice but when
> trying to minimize the new portlets, it fails. The original portlets
> work correctly though. The new ones can be correctly sorted, this
> seems to work fine. What am I doing wrong here?




-- 

http://www.ookhandig.nl - de startpagina voor iedereen!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to