evoShop.ELEMENT.text( [text] )

arguments:

  • text (optional): the contents to set the text of the element(s)
  • returns:

  • If text is not provided, evoShop will return the text of the element.
  • If no arguments are sent, the ELEMENT will be returned
  • <div id="my-div">Hello!</div>
    
    var div = evoShop.$("#my-div");
    var div_text = div.text(); // returns "Hello!"
    
    div.text( div_text + " Bob!" );
    
    <div id="my-div">Hello! Bob!</div>