{"id":551,"date":"2016-02-09T14:50:51","date_gmt":"2016-02-09T14:50:51","guid":{"rendered":"http:\/\/popupdomination.com\/docs\/?p=551"},"modified":"2016-02-09T14:50:51","modified_gmt":"2016-02-09T14:50:51","slug":"on-object-click-triggering","status":"publish","type":"post","link":"https:\/\/popupdomination.com\/docs\/on-object-click-triggering\/","title":{"rendered":"Triggering On Object Click"},"content":{"rendered":"<h1>How to set up PopUp triggering On Object Click?<\/h1>\n<h2>If you want PopUp to be triggered by clicking the object, there are basically two ways to do it, however in both cases you&#8217;ll have to use some easy coding.<\/h2>\n<p><div class=\"st-accordion-wrap\"><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#object-class-from-source-code\">Object Class from Source Code<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h3>1. Let&#8217;s say, we want PopUp to trigger when someone click on the website top, we right click on the object we are interested in and click Inspect (Chrome) or Inspect Element (FireFox, Edge):<\/h3>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-554\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/Click1-1.png\" alt=\"Click1\" width=\"1341\" height=\"933\" \/><\/p>\n<h3>2. In the HTML we look for class that is associated with the object we&#8217;re interested in. In our case it&#8217;s top:<\/h3>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-556\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/Click2-1.png\" alt=\"Click2\" width=\"1106\" height=\"887\" \/><\/p>\n<h3>3. Now we go to PopUp Wizard and in Step 3 at When to show choose On Object Click and type the class name\u00a0 top in input field. That&#8217;s it!<\/h3>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-557\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/Click3-2.png\" alt=\"Click3\" width=\"1192\" height=\"788\" \/><br \/>\n&nbsp;<br \/>\n<\/div><br \/>\n<div class=\"st-accordion-title\"><span class=\"plus\">+<\/span><span class=\"minus\">-<\/span><a href=\"#self-made-object-class\">Self made Object Class<\/a><\/div><div class=\"st-accordion-content\"><\/p>\n<h3>1. If your website platform allows some custom HTML you can make your own Object Class name. Let&#8217;s say, we want to PopUp to appear, when someone clicks the advertising image named <em>ad_<\/em><strong><em>image.png<\/em> and it&#8217;s stored at <\/strong><strong><em>http:\/\/popupdomination.com\/images\/03\/ . <\/em>We add the following line in our page: <em>&lt;a class=&#8221;popdom&#8221; href=&#8221;#&#8221;&gt;&lt;img src=&#8221;http:\/\/popupdomination.com\/images\/03\/ad_image.png&#8221; alt=&#8221;umbrellas with 50% discount&#8221; width=&#8221;425&#8243; height=&#8221;319&#8243; \/&gt;&lt;\/a&gt;. <\/em>Where:<\/strong><\/h3>\n<ul>\n<li>\n<h3><strong> <em>&lt;a class=&#8221;popdom&#8221; href=&#8221;#&#8221;&gt;<\/em><\/strong> &#8211; we tell that Class name will be popdom and there&#8217;s no link attached;<\/h3>\n<\/li>\n<li>\n<h3><strong><em>&lt;img src=&#8221;http:\/\/popupdomination.com\/images\/03\/ad_image.png&#8221;<\/em>\u00a0 &#8211; we tell the address of the image; <\/strong><\/h3>\n<\/li>\n<li>\n<h3><strong><em>alt=&#8221;umbrellas with 50% discount&#8221; width=&#8221;425&#8243; height=&#8221;319&#8243; \/&gt;<\/em><\/strong> &#8211; tell the <em>alt <\/em>name, dimensions of image and close the script;<\/h3>\n<\/li>\n<li>\n<h3><strong><em>&lt;\/a&gt;<\/em><\/strong> &#8211; we close the class.<\/h3>\n<\/li>\n<\/ul>\n<h3><strong>Note: &lt;img class=\u201cpopdom\u201d&gt; without &lt;a&gt; and &lt;\/a&gt; is also acceptible, however with &lt;\/a&gt; the cursor changes on hovering object such visitor sees, that object is clickable.<\/strong><\/h3>\n<h3>2. Now we go to PopUp Wizard and in Step 3 at When to show choose On Object Click and type the Class name\u00a0 popdom in input field. That&#8217;s it!<\/h3>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-560\" src=\"https:\/\/popupdomination.com\/docs\/wp-content\/uploads\/2016\/02\/Click3-1-1.png\" alt=\"Click3-1\" width=\"1190\" height=\"786\" \/><br \/>\n<\/div><br \/>\n<\/div><br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to set up PopUp triggering On Object Click? If you want PopUp to be triggered by clicking the object, there are basically two ways to do it, however in both cases you&#8217;ll have to use some easy coding. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[47,63,78],"_links":{"self":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/posts\/551"}],"collection":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":0,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/posts\/551\/revisions"}],"wp:attachment":[{"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/media?parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/categories?post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/popupdomination.com\/docs\/wp-json\/wp\/v2\/tags?post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}