Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7194403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:21:50+00:00 2026-05-28T20:21:50+00:00

I am making a CMS for a website at the moment, and one of

  • 0

I am making a CMS for a website at the moment, and one of the features is that a the user can crop an image on the fly, they does this within a fancybox instance and all the details are possted to the controller via ajax, on successful cropping of the image, I am wanting to close the fancy box instance automatically, however I cannot seem to get the window to close, below is my code,

$("#crop").submit(function(e){
    $.ajax({
        type    :   "POST",
        dataType:   "json",
        url     :   $(this).attr('action'),
        data    :   "x="+$("#x").val()+"&y="+$("#y").val()+"&x2="+$("#x2").val()+"&y2="+$("#y2").val()+"&w="+$("#w").val()+"&h="+$("#h").val()+"&isAjax=1&crop_image=Crop",
        success:function(json) {
            if(json.message == "Image Cropped") {
                $.fn.fancybox.close();
            }
        }
    });
    e.preventDefault();
});

Running this code works fine until $.fancybox.close() where I get this error,

$.fn.fancybox.close is not a function

how can I close fancybox on a successful ajax request?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:21:51+00:00Added an answer on May 28, 2026 at 8:21 pm

    I’m pretty sure it’s:

    $.fancybox.close();
    
    • http://fancybox.net/faq
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app I'm making to run off a CMS that is
I have a open source editor on the cms that I am making that
I have a questing about XSLT. I am making a website on Sitecore CMS,
I'm currently developing a CMS for a website I'm making. I'm using MVCScaffolding to
I've been tinkering with a CMS that I'm making as a personal project and
Im discussed in one of my earlier questions, im making a wedding website with
I am making a CMS which can be extended by third-party developers. In the
I'm making an engine/CMS for story-based web browser games. I have quite a bit
Making an adobe flex ui in which data that is calculated must use proprietary
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.