jQuery Mobile Conflicts
Permalink
I apologise for bringing this up again, I cannot find a definitive answer.
I have create a mobile site by using jquery mobile, and a custom block for mobile navigation, but I cannot allow the css and js files from loading if a use is logged in.
If you do the admin user interface of c5 goes haywire.
this really defeats the purpose of this excellent CMS and the ability to know what you are editing.
Does anyone have a solution to this, or is there anything on the horizon at c5?
Thanks
I have create a mobile site by using jquery mobile, and a custom block for mobile navigation, but I cannot allow the css and js files from loading if a use is logged in.
If you do the admin user interface of c5 goes haywire.
this really defeats the purpose of this excellent CMS and the ability to know what you are editing.
Does anyone have a solution to this, or is there anything on the horizon at c5?
Thanks
Why can't you just use $u->isLoggedIn() to see if you should load the files again.
I am doing this, but this means the design of the page when someone is logged in looks awful.
You shouldn't have problems with the CSS (unless you have used the same IDs/classes as the concrete5 core).
You can detect whether JQuery (or anything else) is loaded by testing for it. e.g.
Or something like that at least (I haven't tried it as duplicates are automatically removed on my site).
You can detect whether JQuery (or anything else) is loaded by testing for it. e.g.
$this->addFooterItem(" <script type="text/javascript"'> if (typeof(jQuery) == 'undefined') { document.write("<scr" + "ipt type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></scr" + "ipt>"); }</script> ");
Or something like that at least (I haven't tried it as duplicates are automatically removed on my site).
Thanks, its actually the jquery.mobile js file. it appends the dom on load to deal with mobile devices. different from the jquery core which is a dependency of it. I am triying the 5.6 alpha to see if there is a better solution, it appears more responsive to mobile sites.