$count=$(".div_count");
var clone_count =!$count.('data') ?1:$cont.data('clone_count')+1;
$count.data('clone_count',clone_count);2009/6/5 Peter Marino <[email protected]> > Hi jQuery, > I have the following: > > if ( $(".div_count").data("clone_count")==undefined ) > { > $(".div_count").data( "clone_count", 1 ); > } > else > { > $(".div_count").data( "clone_count", $(".div_count").data("clone_count")+1 > ); > } > var clone_count = $(".div_count").data( "clone_count" ); > > is there any method that can do this a little simplier (compact).. > > any suggestions? > > Peter > -- > Power Tumbling - http://www.powertumbling.dk > OSG-Help - http://osghelp.com > -- Gustavo Salome Silva

