{"id":1980,"date":"2013-01-13T03:01:49","date_gmt":"2013-01-13T03:01:49","guid":{"rendered":"https:\/\/theextremewebdesigns.com\/blog\/?p=1980"},"modified":"2013-01-13T03:01:49","modified_gmt":"2013-01-13T03:01:49","slug":"jquery-mouseout-jquery-onmouseout-using-mouseout-in-jquery-example","status":"publish","type":"post","link":"https:\/\/theextremewebdesigns.com\/blog\/jquery-mouseout-jquery-onmouseout-using-mouseout-in-jquery-example\/","title":{"rendered":"jQuery Mouseout Example"},"content":{"rendered":"<p>The commonly known onmouseout event in JavaScript is synonym to using mouseout in jQuery. But do you know how to use mouseout in jQuery? In this article, I am going to show how to use the <strong>mouseout event in jQuery<\/strong>. This event can be applied for mouseout effects on Divs, Images, etc. So read on to find out more.<!--more--><\/p>\n<h2>How To Use jQuery mouseout Event<\/h2>\n<div class=\"make_demo\">\r\n\r\n\t<form action=\"https:\/\/theextremewebdesigns.com\/blog\/wp-content\/themes\/ewd_blog_2017\/try_demo.php?post_id=1980\" method=\"post\" name=\"form1\" target=\"_blank\" id=\"form1\">\r\n\r\n\r\n\t<input type=\"hidden\" name=\"shortcode_content\" id=\"shortcode_content\" value=\"\" \/>\r\n\r\n        <div class=\"try_demo_btn_container\">\r\n\r\n\r\n            <button type=\"submit\" name=\"sbt_make_demo\" id=\"sbt_make_demo\" class=\"btn-primary btn-try-demo\">\r\n                Try Demo\r\n            <\/button>\r\n\r\n\r\n        <\/div><!-- .try_demo_btn_container -->\r\n\r\n    <\/form>\r\n    <\/div>\r\n    \n<p>So let&#8217;s discuss it\u00a0using an easy example. Let&#8217;s assume that we have few div&#8217;s in our page &amp; we would like to alert the ID of the div on mouseout, just so that we can see the the name of the div that was hovered out from. I am providing each div with a unique name &amp; ID.<\/p>\n<p><strong>Here is the complete source code HTML + jQuery for OnMouseout Event in jQuery:<\/strong><\/p>\n<pre class=\"lang:xhtml decode:true crayon-selected\" title=\"Example\">&lt;html&gt;\n&lt;head&gt;\n&lt;title&gt;jExamples on using Mouseout Event in jQuery&lt;\/title&gt;\n&lt;script type=\"text\/javascript\" src=\"js\/jquery-1.8.2.min.js\"&gt;&lt;\/script&gt;\n&lt;style type=\"text\/css\"&gt;\n#my_div1,\n#my_div2,\n#my_div3,\n#my_div4 {\n\ttext-align: center;\n\twidth: 200px;\n\tmargin-bottom: 10px;\n\tpadding: 10px;\n}\n\n#my_div1 {\n\tborder: 3px solid #CCC;\n}\n\n#my_div2 {\n\tborder: 3px solid #6C0;\n}\n\n#my_div3 {\n\tborder: 3px solid #F30;\n}\n\n#my_div4 {\n\tborder: 3px solid #93F;\n}\n\n&lt;\/style&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n&lt;div id=\"my_div1\"&gt; This is div 1\n  &lt;div id=\"my_div2\"&gt; This is div 2\n    &lt;div id=\"my_div3\"&gt; This is div 3 &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;div id=\"my_div4\"&gt; This is div 4 &lt;\/div&gt;\n&lt;\/div&gt;\n\n&lt;script type=\"text\/javascript\" language=\"javascript\" &gt;\n\n$(document).ready(function(){\n\n\t$('#my_div1').mouseout(function() {\n\t  alert('Div 1 was hovered out from!');\n\t});\n\n\t$('#my_div2').mouseout(function() {\n\t  alert('Div 2 was hovered out from!');\n\t});\n\n\t$('#my_div3').mouseout(function() {\n\t  alert('Div 3 was hovered out from!');\n\t});\n\n\t$('#my_div4').mouseout(function() {\n\t  alert('Div 4 was hovered out from!');\n\t});\n\n});\t\n\n&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n<div class=\"make_demo\">\r\n\r\n\t<form action=\"https:\/\/theextremewebdesigns.com\/blog\/wp-content\/themes\/ewd_blog_2017\/try_demo.php?post_id=1980\" method=\"post\" name=\"form1\" target=\"_blank\" id=\"form1\">\r\n\r\n\r\n\t<input type=\"hidden\" name=\"shortcode_content\" id=\"shortcode_content\" value=\"\" \/>\r\n\r\n        <div class=\"try_demo_btn_container\">\r\n\r\n\r\n            <button type=\"submit\" name=\"sbt_make_demo\" id=\"sbt_make_demo\" class=\"btn-primary btn-try-demo\">\r\n                Try Demo\r\n            <\/button>\r\n\r\n\r\n        <\/div><!-- .try_demo_btn_container -->\r\n\r\n    <\/form>\r\n    <\/div>\r\n    \n<p><strong>That&#8217;s it!<\/strong><\/p>\n<p>Do you know of any other ways to use <em><strong>jQuery mouseout event<\/strong><\/em>? Feel free to suggest by commenting below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The commonly known onmouseout event in JavaScript is synonym to using mouseout in jQuery. But do you know how to use mouseout in jQuery? In this article, I am going to show how to use the mouseout event in jQuery. This event can be applied for mouseout effects on Divs, Images, etc. So read on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":395,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[20,13],"tags":[42,41],"class_list":["post-1980","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery-tips-and-tricks","category-tips-and-tricks","tag-jquery-demos-2","tag-jquery-tips"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paBnQX-vW","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/1980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=1980"}],"version-history":[{"count":0,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/1980\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=1980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=1980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=1980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}