Unable to select page contents through class in jQueryMobile - jquery-selectors

I'm unable to select page contents through class in jQueryMobile.
$('div[data-role="content"]'); works fine
$('div.ui-content'); only selects a few

jQuery Mobile adds the class when it enhances the page. You might be calling the selector before the enhancement is done (I won't guess no more, it's your app ;) )
the correct way to get all the content nodes is:
$("div:jqmData(role='content')")

You should omit the blank, not
$('div .ui-content');
but
$('div.ui-content');

Related

How to use URL parameters in Flutter Web?

I want to make it so when a user enters the URL of the app they'd get the same page, no matter what they added after the '/', but have a string stored in the code with the value after the '/'.
for example: if they enter the URL "exampleurl.app/blabla", the String would have the value "blabla".
I managed to that somewhat with Uri.base, the problem is that after the app loads the URL removes all the text after the '/' automatically, and whenever I reload the site it reloads it without the URL with the text removed.
Also if the current URL in the tab is already of the app ("exampleurl.app/nomatterwhatsaddedhere"), it assumes that it is the same URL and doesn't even reload.
It would be greatly appreciated if someone could show me a way to get the string from the URL without these issues.
Thanks in advance!
You need to use Navigator 2.0 for this kind of functionality. I recently wrote a short series that explains simply how to implement Navigator 2.0. It goes into detail explaining how to work with the URL in an app for similar functionality to what you are after, though you will need to tweak it for your use case. It provides a detailed walkthrough along with sample code available on GitHub.
A Simpler Guide to Flutter Navigator 2.0

How to find if web page got appended using chrome extension

I am new to chrome extension and I am trying to find whether page content got appended.
For E.g. in Facebook, we can see the content will appended automatically when the user scroll down the page.
I have the following code in background.js
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
alert("page is appending....");
});
The above code is expected to fire when the page got updated. But, I am seeing that it is getting called only for few times. Not always.
Or Am I making any mistake here ?
My requirement is, whenever the web page appended in facebook, I have to do get the page content and obtain few string from the same.
Thanks in advance.
Your onUpdated event is in the chrome.tabs namespace on purpose, it listens the updates of tab's general attributes like: the tab pinned, the favicon changed, the URL changed, see the documentation (also check the update() method). So this way is not workable. Instead listen the DOM tree change with DOMSubtreeModified event or MutationObserver.

App name showing incorrectly on the ticker

We have an old name for the app and we want the app to show the correct name on the ticker but we have not been able to do it (it is still showing the old name). We updated the title of the url canvas and submitted it on the debugger and interestingly enough, the title is taken correctly on the https address (it is shown on the debugger page but not in the ticker) but not on the http url. Actually it says for the http that the app has problems with the meta tags. Any idea on how to fix this problem? Thanks a Lot, Gilmer
Go to http://developers.facebook.com/tools/debug
Enter your url in that and try to generate all the information.
If that is not showing any errors in that, then scroll down at the end of the page.
You will find block named as "URLs"
Click on the first link named as: "Graph API:".
This will solve your issue.
In future, if you are going to change any content from your page, then don't forget to do the same process once again.
Thanks!

<fb:comment> tag not working properly

I have a GWT app and Im trying to put fb social plugin comment in side of my page. However I have the folowing problem.
If I put the tag in my .html it works perfect, but If I put id dynamically (like with an HTML widjet), It does not work. It just does not display anything.
Can anyone help me? Im having this problem in general, not only with the fb:comment tag.
Note: If I use the iframe implementation of, for example, "fb:like", it works perfect.
My understanding of facebook's api is that it loads your content, and parses out the tags in the fb namespace, replacing them before the actual content is drawn for the user. In contrast, none of the GWT compiled code (or indeed any Javascript code) gets a chance to make changes to the dom until the page has loaded in the browser fully, after facebook has made the changes it needs to.
My advice: Put the fb namespaced tags on the initial page, but perhaps wrap them in a div and mark them as display:none. Then you can grab them from your GWT code and wrap them up in a widget, only to be displayed when you are ready.

FB.provide is not a function

I'm developing a WordPress plugin to show above or bottom the posts Facebook like and send buttons.
Unfortunately when is also activated a plugin for Facebook share button there is a Javascript error (FB.provide is not a function) and like and send buttons don't appear.
For example this happens in this page: http://www.pasqualepuzio.it/2011/04/plugin-facebook-like-and-send-button/
How can I solve this issue?
Thank you very much
I ´ve faced the same problem and it happens if you add the script twice on the site (http://connect.facebook.net/sv_SE/all.js)
I understood that part that we cant have all.js twice but I want to have Facebook Share Button and Facebook Like Button.
According to Docs, I need to include these two JS Files.
https://connect.facebook.net/en_US/all.js
http://static.ak.fbcdn.net/connect.php/js/FB.Share
Now, If I include both Firebug will give me same error "FB.provide is not a function". If I remove either of them then Like or Share button wont work.
I can do iFrame version but I have HTML Encoding issues with iFrame Version. I am programmatic generating HTML Response.
Any idea, how to approach?
There is a workaround for this: instead of placing the javascript Fb.Share within the same page where you are loading the Javascript SDK, use an Iframe with the first and set it in the second.