V
V
Victor_Pasyk2017-10-10 15:49:01
css
Victor_Pasyk, 2017-10-10 15:49:01

How to fix Uncaught Error: Syntax error, unrecognized expression in js?

Hello!
Updated the site, and now on all pages there was an error Uncaught Error: Syntax error, unrecognized expression which leads to the content file of which is below:

(function($){var e=window.console?console.log:alert;$.fn.popUpForm=function(options){$("#popUpHide").length||$('<div id="popUpHide" />').appendTo('body').css('display','none');if(!options.container){alert('Требуется контейнер с опциями');return;}var defaults={container:'',modal:true,resizeable:false,width:480,title:'Войти в личный кабинет',beforeOpen:function(container){},onSuccess:function(container){},onError:function(container){}};var opts=$.extend({},defaults,options);this.each(function(){var $this=$(this);if(!$this.is('a')||$this.attr('href')==''){return;}var SRC=$this.attr('href')+' '+opts.container;var formDOM=$("<div />").load(SRC,function(){$('#popUpHide').append(formDOM);$(opts.container).dialog({autoOpen:false,closeOnEscape:true,width:opts.width,modal:opts.modal,resizable:opts.resizeable,title:opts.title});$(opts.container).bind('submit',function(e){e.preventDefault();ajaxSubmit($this[0]);});$this.bind('click',function(e){e.preventDefault();opts.beforeOpen.call($this[0],opts.container);$(opts.container).dialog('open');});});});function ajaxSubmit(anchorObj){console.log(anchorObj);var form=$(opts.container);var method=form.attr('method')||'POST';$.ajax({type:method,url:form.attr('action'),data:form.serialize(),success:function(){$(opts.container).dialog('close');opts.onSuccess.call(anchorObj,opts.container);},error:function(){opts.onError.call(anchorObj,opts.container);}});}}})(jQuery);


Tell me what I did wrong.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Khvatov, 2019-10-06
@Dimarik9

I don’t know myself, but there is a solution:
instead of setting the height and width of the window, set the screen orientation, that is,
instead of "@media all and (width:393px) and (height:818px)" insert "@media all and (orientation : portrait) "
more details can be searched on the Internet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question