Plugin jQuery: Hover and Click Trigger for Circular Elements with jQuery

Hover and Click Trigger for Circular Elements with jQuery
http://www.jqueryrain.com/?http://tympanus.net/Development/HoverClickTriggerCircle/#
http://tympanus.net/codrops/2011/11/22/hover-and-click-trigger-circular-elements/
22/11/2011

Nội dung

Hover and Click Trigger for Circular Elements with jQuery

Applying a :hover pseudo-class to an element is widely known as the classic “hovering” over an element on a web page. A problem that arose with the introduction of the border-radius property is the non-realistic triggering of the hover event when entering the bounding box of the element and not just the actual visible area. This becomes extreme when we create a circle by setting the border-radius of a square to 50% (half of its outer width and height).

Today we want to share one possible solution to the circle hovering problem. We’ll create a plugin that will take care of the ‘mouseenter’, ‘mouseleave’ and ‘click’ events to be triggered only on the circular shape of the element and not its bounding box.

Tags: Image Hover Effect

Nguồn: www.jqueryrain.com/2011/11/hover-and-click-trigger-for-circular-elements-with-jquery/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận