Ramprasad
Ramprasad

Reputation: 8071

How to cancel sortable for both header and content in portlet

I want to cancel sortable portlet option for two div classes.I have tried below coding,

My Div:

<div class="column">
    <div class="portlet>
       <div class="portlet-header 
       <div class="portlet-content">
    </div>
  </div>

Tried to cancel sortable:

$( ".column").sortable( "option", "cancel", '.portlet-header');    
$( ".column").sortable( "option", "cancel", '.portlet-content');

It doesn't cancel sortable for both header and content.But if i cancel header only, it cancels otherwise if cancel content only, it cancels propely. I want to make cancel sortable for both.How to cancel for both header and content?

Upvotes: 0

Views: 93

Answers (3)

Ramprasad
Ramprasad

Reputation: 8071

 $(".column").sortable("option", "cancel", ".portlet-header, .portlet-content"); 

This code Works fine..

Upvotes: 1

AlexC
AlexC

Reputation: 9661

         $( ".column" ).sortable({
            items: "div:not(.portlet-header,.portlet-content)"
        });

check you html as well, at least it looks invalid :

<div class="portlet-header

'>' is missing

<div class="portlet-header">

Upvotes: 0

ZippyV
ZippyV

Reputation: 13058

Try

$(".column").sortable("option", "cancel", ".portlet-header, .portlet-content");

Upvotes: 0

Related Questions