cur_x is not defined - a simple fix
  • I have been using PrettyLoader for a while. It's pretty awesome, however it sometimes produces an error "cur_x is not defined" when trying to show the spinner. I have checked the plugin's code and made a simple change that prevents that error from showing up. Here it is:

    find the code below:
    replace it with:
    cur_x=(e.clientX)?e.clientX:(typeof(cur_x) != 'undefined' ? cur_x : 0);
    cur_y=(e.clientY)?e.clientY:(typeof(cur_y) != 'undefined' ? cur_y : 0);

    It just checks if the variables are defined and puts 0 if they aren't. I am not sure if this is the best solution, but it's pretty simple and effective.

    Glad I could help and thanks for the great plugin!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter