{"id":70,"date":"2023-08-25T17:40:56","date_gmt":"2023-08-25T17:40:56","guid":{"rendered":"\/\/api.jqueryui.com\/1.12\/?p=70"},"modified":"2023-08-25T17:40:56","modified_gmt":"2023-08-25T17:40:56","slug":"jQuery.effects.clipToBox","status":"publish","type":"post","link":"https:\/\/api.jqueryui.com\/1.12\/jQuery.effects.clipToBox\/","title":{"rendered":"jQuery.effects.clipToBox()"},"content":{"rendered":"<article id=\"jQuery-effects-clipToBox1\" class=\"entry method\"><h2 class=\"section-title\">\n<span class=\"name\">jQuery.effects.clipToBox( animationProperties )<\/span><span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a><\/span><span class=\"version-details\">version added: 1.12<\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>Calculates position and dimensions based on a clip animation.<\/p>\n<ul class=\"signatures\"><li class=\"signature\">\n<h4 class=\"name\"><a id=\"jQuery-effects-clipToBox-animationProperties\" href=\"#jQuery-effects-clipToBox-animationProperties\"><span class=\"icon-link\"><\/span>jQuery.effects.clipToBox( animationProperties )<\/a><\/h4>\n<ul><li id=\"jQuery-effects-clipToBox-animationProperties-animationProperties\">\n<div><strong>animationProperties<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a>\n<\/div>\n<div>A set of properties that will eventually be passed to <a href=\"\/\/api.jquery.com\/animate\/\"><code>.animate()<\/code><\/a>. The <code>animationProperties<\/code> must contain a <code>clip<\/code> property.<\/div>\n<\/li><\/ul>\n<\/li><\/ul>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n\t\t\t<p>This method is useful for mimicking a clip animation when using a placeholder for effects. Given a clip animation, <code>jQuery.effects.clipToBox()<\/code> will generate an object containing <code>top<\/code>, <code>left<\/code>, <code>width<\/code>, and <code>height<\/code> properties which can be passed to <a href=\"\/\/api.jquery.com\/css\/\"><code>.css()<\/code><\/a> or <a href=\"\/\/api.jquery.com\/animate\/\"><code>.animate()<\/code><\/a>. This method is generally used in conjunction with <a href=\"\/1.12\/jQuery.effects.createPlaceholder\/\"><code>jQuery.effects.createPlaceholder()<\/code><\/a>.<\/p>\n\t\t<\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Calculates position and dimensions based on a clip animation.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,10],"tags":[],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-effects","category-effects-core"],"_links":{"self":[{"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":1,"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/posts\/70\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.12\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}