{"id":1399,"date":"2022-08-30T15:16:12","date_gmt":"2022-08-30T15:16:12","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/15\/jquery-popover-flickers-on-first-hover-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:16:12","modified_gmt":"2022-08-30T15:16:12","slug":"jquery-popover-flickers-on-first-hover-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/jquery-popover-flickers-on-first-hover-collection-of-common-programming-errors\/","title":{"rendered":"Jquery popover flickers on first hover-Collection of common programming errors"},"content":{"rendered":"<p>Popover not working properly on first hover its flickers, second time it works fine Below is code Data is coming from database using ajax.<\/p>\n<p>Sorry for any wrong think as i am using stake overflow for first time<\/p>\n<p>Jquery:<\/p>\n<pre><code>       $.fn.popover &amp;&amp; $('[rel=\"popover\"]').popover({delay: 2000});\n\n       $(\".ad-report-tooltip\").hover(function(e)\n        {\n\n            if($(e.target).attr('data-content') == undefined)\n            {\n\n                $(e.target).popover('hide');\n                var toolTipId = $(e.target).attr('tooltip-id');\n                ajax_request = $.ajax\n                (\n\n                    {\n                        type:\"GET\",\n                        url: \"tooltips?id=\" + toolTipId,\n                        async: true,\n                        contentType: \"application\/json\",\n                        dataType: 'jsonp',\n\n                    success: function(data)\n                        {\n\n                            \/\/alert(data['result_set']);\n                            $(e.target).attr('rel','popover');\n                            $(e.target).attr('data-content',data['result_set']);\n                            $(e.target).popover('show');\n\n                        },            \n                    }    \n                );\n\n            }\n\n        },function(){});  \n        $(\".ad-report-tooltip\").mouseout(function(){\n            ajax_request.abort();\n        });\n<\/code><\/pre>\n<p>Html:<\/p>\n<pre><code>Filter By : \n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-15 09:09:07. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Popover not working properly on first hover its flickers, second time it works fine Below is code Data is coming from database using ajax. Sorry for any wrong think as i am using stake overflow for first time Jquery: $.fn.popover &amp;&amp; $(&#8216;[rel=&#8221;popover&#8221;]&#8217;).popover({delay: 2000}); $(&#8220;.ad-report-tooltip&#8221;).hover(function(e) { if($(e.target).attr(&#8216;data-content&#8217;) == undefined) { $(e.target).popover(&#8216;hide&#8217;); var toolTipId = $(e.target).attr(&#8216;tooltip-id&#8217;); ajax_request [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1399","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1399"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1399\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}