Uncaught ReferenceError help?

0

I'm having this following error:

Uncaught ReferenceError: szClose is not defined

at jquery.colorbox.js?x=30:45
at jquery.colorbox.js?x=30:1026

Where is the problem?

(function ($, document, window) {
	var
	// Default settings object.
	// See http://jacklmoore.com/colorbox for details.
	defaults = {
		transition: "none",
		speed: 300,
		fadeOut: 300,
		width: false,
		initialWidth: "400",
		innerWidth: false,
		maxWidth: false,
		height: false,
		initialHeight: "150",
		innerHeight: false,
		maxHeight: false,
		scalePhotos: true,
		scrolling: false,
		inline: false,
		html: false,
		iframe: false,
		fastIframe: true,
		photo: false,
		href: false,
		title: true,
		rel: false,
		opacity: 0.8,
		preloading: false,
		className: false,

		// alternate image paths for high-res displays
		retinaImage: false,
		retinaUrl: false,
		retinaSuffix: '@2x.$1',

		// internationalization
		current: "image {current} of {total}",
		previous: "previous",
		next: "next",
		close: szClose,
		xhrError: "This content failed to load.",
		imgError: "This image failed to load.",
    
asked by anonymous 16.09.2017 / 02:52

1 answer

0

Reading the plugin documentation ColorBox is noted in the Settings (Settings) session that the close option receives value type Texto or HTML , error is occurring because szClose does not exist.

You can solve it in two ways.

  • Create a variable before the line var defaults

    var szClose = "Fechar";
    
  • Change the value of option close

    close: "Fechar"
    

Note: I just replied, because the error is clear even though the code is not complete.

    
17.09.2017 / 09:53