simpleCart(js)

items
Items:
Total:

'ready' Event

The ‘ready’ event is triggered once when simpleCart has been initialized.


// log the total when simpleCart has initialized
simpleCart.bind( 'ready' , function(){
  console.log( "simpleCart total: " + simpleCart.toCurrency( simpleCart.total() ) ); 
});

You can also use the .ready() shortcut:

simpleCart.ready( function(){
  console.log( "simpleCart total: " + simpleCart.toCurrency( simpleCart.total() ) ); 
});

 

Comments

  1. There are no comments for this entry yet.
Commenting is not available in this channel entry.