leanModal initiate without .click()

Viewed 9709

I'm using the leanModal http://leanmodal.finelysliced.com.au need to initiate it to open a div but without the .click() method. Basically I'm trying to do this..

  if(cartItems === 0){
    $("#cartEmpty").leanModal(); // #cartEmpty is my div with the message that needs to be initiated.
  } else {
    $("#nextStep").leanModal(); // #nextStep is my div is the form 
  }

Any ideas on this one?

1 Answers
Related