i want to show loading gif until data loaded with jquery mobile
but it does not work ..in console it give that error
Uncaught TypeError: Object #<Object> has no method 'loading'
this is my page :enter link description here
and in this page that i added code
$.mobile.loading( 'show');
and this not work:enter link description here
my code
<script type="text/javascript">
$('#details').live('pageinit', function (event) {
$.mobile.showPageLoadingMsg();
$("#listeu").empty();
$.getJSON('http://teknonova.com/Map/Home/getir3/1', function (data) {
The error sounds like either the jquery mobile library wasn't loaded properly (maybe loaded before jquery and failed init) or the version of jquery mobile doesn't support that method.
I'd use the dev console to see what the $.mobile object is for more clues
Related
I recently upgraded from JQuery 1.9 to 3.3.1 and am getting an error in some of my old code relating to the $.parseHTML() function.
The docs state some changes in the behavior of this function but shouldn't effect my usage.
I'm trying to ajax GET a view, parse it, append it to modal content, and then show the modal.
success: function(editView){
//GETTING ERROR AT THE BELOW LINE
var html = $.parseHTML(editView, $('.modal-edit-content'), true);
//load editView into the modal content tag
$('.modal-edit-content').html('');
$('.modal-edit-content').append(html);
}...
This is the error:
jquery-3.3.1.min.js:2 Uncaught TypeError: t.createDocumentFragment is not a function
The code was working correctly in JQuery 1.9. Any ideas how to fix this?
I am using Telerik UI controls. They have a embedded JS, which looks like is having some dependency on Safari 9.0.3(10601.44) Developer console.
When we try to load telerik tree-view in telerik combo box, we get the followin error. Only in Safari 9.0.3(10601.44)
Same in text
_initRightToLeftScriptResource.axd:8396TypeError: null is not an object (evaluating 'c.set_additionalQueryString')
_initRightToLeftScriptResource.axd:8395
initializeScriptResource.axd:8332
endUpdateTelerik.Web.UI.WebResource.axd:2:49050
endCreateComponentsTelerik.Web.UI.WebResource.axd:2:63458
_raiseInitTelerik.Web.UI.WebResource.axd:2:65559
_doInitializeTelerik.Web.UI.WebResource.axd:2:63974
(anonymous function)Telerik.Web.UI.WebResource.axd:2:65784
(anonymous function)Telerik.Web.UI.WebResource.axd:2:50713
pTelerik.Web.UI.WebResource.axd:2:558
_2PassTelerik.Web.UI.WebResource.axd:2:50697
My problem is very similar to this Why does JavaScript only work after opening developer tools in IE once? but in Safari.
I tried all those suggestions, none of them were helping.
Update
Code works fine with some delay in calling function.
if (navigator.sayswho === "Safari 9") {
setTimeout(function() {
try {
loadInit();
} catch (e) {
alert("error");
console.log(e);
}
}, 1000);
tried all following, none is working, not sure how to trace the right event of full DOM is loaded and no pending ajax calls happening.
$(document).load(...)
$(window).load(...)
<body onload="....">
Since you are using Telerik controls, use:
Sys.Application.add_load(MyFunction);
function MyFunction(sndr, args){
//your code
}
This only calls the function once all the telerik controls have loaded.
I am creating my first yii framework project. I am using cgridview in my project. When I load the page an error is showing in the console. The error is coming from a Javascript code generated by cgridview.
error is
TypeError: jQuery(...).on is not a function
jQuery(document).on('click','#items-grid a.delete',function(){
My javascript is
/*<![CDATA[*/
jQuery(function($) {
jQuery(document).on('click','#items-grid a.delete',function(){
confirmDelete(this);
return false;
});
jQuery('#items-grid').yiiGridView({'ajaxUpdate':['menuitems- grid'],'ajaxVar':'ajax','pagerClass':'pager','loadingClass':'grid-view-loading','filterClass':'filters','tableClass':'items','selectableRows':1,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'items_page'});
});
/*]]>*/
What Kind of issue this is. I have included jquery.js latest vertion in my header. I tried older version also but this error is same. How should I fix this error?
You may need to disable Yii's build-in JQuery and use your own version of JQuery. To disable Yii's built-in JQuery put the following lines into your view and load your own JQuery with avoiding conflicts:
Yii::app()->clientScript->scriptMap=array(
'jquery.js'=>false,
'jquery.ui.js' => false,
);
I'm working with jQuery Mobile and I tried to refresh a flipswitch but when I try to do
$("#flipEnabled").slider("refresh");
I get an error in the console : Uncaught Error: cannot call methods on slider prior to initialization; attempted to call method 'refresh'
Is there a solution for this issue ?
Try the following:
if (!$('#flipSwitch').checked) {
$('#flipSwitch').prop('checked', false);
$('#flipSwitch').flipswitch('refresh');
}
I am using Thickbox 3.1(by cody lindley) in my asp.net application. While closing thickbox I am getting jquery error from file "jQuery UI Tabs 1.7.2" file which is for showing image slider on the same parent page,
Error is :-
Microsoft JScript runtime error: Unable to get value of the property 'add': object is null or undefined.
and while debugging its coming from the below code,
a(window).bind("unload", function ()
{
p.lis.add(p.anchors).unbind(".tabs");
p.lis = p.anchors = p.panels = null
})
as "p.anchors" is coming null, but how to solve this issue.
Just got the solution guys, great effort on by "maxchirkov" on weblink http://wordpress.org/support/topic/wp-32-thickbox-jquery-ui-tabs-conflict.
The issue was from "unload" event conflict in the thickbox and Jquery-UI-tabs scripts.
In the thickbox.compressed.js, I hv changed:-
// $("#TB_window").fadeOut("fast", function () { $('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove(); });
above code to :-
$("#TB_window").fadeOut("fast", function () { $('#TB_window,#TB_overlay,#TB_HideSelect').unload("#TB_ajaxContent").unbind().remove(); });
and its working now.