Some js file and social media plugin did not load when changing pages using jQuery Mobile Sliding Panel - facebook

I am using jQuery Mobile's panel feature to navigate between pages. Most of my pages have some jssor plugin and social media plugins like Facebook and Twitter. The plug ins do not work through the panel item when selected.
This is my current page:
http://191armyband.com/contact.html
I clicked menu and go to home page, the home page should load Twitter feeds, Facebook plug in and a jssor plugin. All these do not work if I navigate here from the panel.
I am assuming if I turn off the AJAX feature from jQuery Mobile, I might make this work...
$.mobile.ajaxEnabled = false;
Is this the correct code to use? How should I integrate it in my code?
Here is the code of my current page:
http://jsfiddle.net/humorean/n7x4mv9k/

Try put the stop AJAX script right before your jQuery Mobile js:
<script type="text/javascript">
$(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = false;
});
</script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
Put this script in all the landing pages for all pages to work with the plugins.

Related

In facebook apps When i right click on a menu its open outside the canvash?

I am working on a Facebook apps when i right click on a menu it open in new tab but outside the canvas what the problem with me.
This is the default behaviour of the browser and not your application. I use some JavaScript to detect if the user is viewing my app outside of Facebook, and redirect them back to the Facebook Canvas URL. The below code will redirect those that open links in New Tabs / Windows to go back to facebook.
<script type="text/javascript">
if ( top === self ) {
window.top.location = '{$canvas_url}';
}
</script>

How to link to external website from the app icons below the Timeline on Facebook?

How do you make those icon apps below your timeline so that when you click on one of them it opens a new window (or the same window) and goes to an external website?
I think this is the app you might be looking for
https://www.facebook.com/iframehost?sk=app_208195102528120
i don't think you can do that. But, you can make it so that when you click them, they will go to the app page as normal, and in that app page you can put a javascript code to redirect that page:
<script type="text/javascript">
top.window.location.replace('NEWLOCATION');
</script>
It will redirect the page (one which facebook is in)

iFrame in popup

Since, my site is an online magazine, I'd like to make a custom reader for the articles. Thing is I'd like a pop-up iframe reader. Something like the Facebook photo theater. It pops up within the page and not as a separate window. In that pop up I'd like to put an iframe code. Does anyone know how I can achieve this?
Simply google for javascript lightbox tutorial. Or in case you use jQuery, there are dozens of plugins out there.
For example:
Fancybox
jQuery lightBox plugin
Lightbox 2

Change facebook app profile page

I have a facebook application and when it posts to a users stream it shows the application name and clicking that directs the user to the applications profile page. Is it possible to change this link to another page or set the application profile page to load another page?
I'm not sure about changing the link but you can make one page automatically load another page.
See an example on our fan page here: http://www.facebook.com/pages/Premier-League-Prophet/193957803989227
When you visit this page it automatically redirects to our app profile page instead at http://www.facebook.com/apps/application.php?id=105260882892290
1) Add the "Static HTML: iframe tabs" app to your page. This lets you configure any static HTML as the source for a page tab.
2) Use a quick bit of redirect code so that when the tab loads it automatically redirects the browser to where you want to go:
<html>
<head>
</head>
<body>
<script language="JavaScript">
// Redirect to chosen destination
top.location.href = "http://www.googl.com/";
</script>
</body>
</html>
3) In the page config, set the new tab as the default tab for the page.
One small limitation. The default tab setting is only respected if the user has not yet liked the page. If they have liked the page, then the wall is displayed by default. However, if you're configuring the page to auto-redirect, this shouldn't be a problem, because no visitor to the page will stay on it long enough to like it.

Facebook fan page iframe tab links not opening in the iframe

I have a basic facebook iframe application that sits inside a fan page tab. All i want to do is have the links in my application open inside of the iframe. I tried to change their target to _self but no sauce, all of the links open in a new window. The application is here
Remove the target="_blank" attribute from the links.
Btw, that's not an iframe application. Looks like a static FBML tab app.
Have you tried adding target="_top"