

If the user taps within the button, a DOM event is generated which is caught by the outer div which will execute the function called by onclick="showCart() ", and prior to this the data-zineone-meta tag in the div will be executed. In this case note that we need to apply the data-zineone-meta attribute on both the outer div as well as the inner span elements.
#ANIMATE.CSS APPBOX CODE#
The code for this example is shown below: Assume you want to use the data-zineone-meta attribute to accomplish two goals: (a) to send an event to ZineOne server to track how many users clicked on this button, and (b) to close the message after the user taps on the button. If close=false, then the widget will remain open.ĭue to HTML5 event propagation rules, you may have to specify data-zineone-meta attribute on the target DOM element where the required actions need to be performed as well as any appropriate child nodes of the target DOM element.Įxample: Lets consider the common case of an HTML5 Button defined as a element containing the text “View Cart” in a child node. By default, the widget always closes itself. close:false: This property is used to specify whether the currently rendered widget will close or remain open having taken any of the above action(s).link: : This property is used to specify a URL that opens up in the target specified(_blank, _self, _parent, _top).

Sending this event and its query string payload to ZineOne server could be used to gather user interaction analytics or to even perhaps trigger a new message from the server-side. Along with this event, the SDK will also include two parameters named param1 and param2 that are specified as query string with values val1 and val2 respectively.

