Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am working on a website and I am having troubles telling google not to index one <div> which is normally hidden (display: hidden;) on load because it is a popup (login popup). It is really bad when login popup goes right after tag because I usually store all popups at the beginning of body so content of it goes to description of my website in google search.
Do you have any ideas how can I hide it from google (maybe via javascript)?
EDIT: Thank you guys, you gave me a great solution with googleoff/on!
I thnk this is what you're looking for
http://perishablepress.com/tell-google-to-not-index-certain-parts-of-your-page/
<div>This is normal (X)HTML content that will be indexed by Google.</div>
<!--googleoff: index-->
<div>This (X)HTML content will NOT be indexed by Google.</div>
<!--googleon: index>
Go through this link (Tell Google to Not Index Certain Parts of Your Page: may be helpful) : http://perishablepress.com/tell-google-to-not-index-certain-parts-of-your-page/
put the div farther down (aka at the end) in the content and use css to position it where you want it when visible.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I've always wondered how the "read mode" extensions know exactly where the main content is.
If every webpage out there had its main content in a div marked with the id of #content or something. But is there a way to know which div is the wrapper for the main content?
Here's what I want to do
I want to create a script where I inject a text box to the right of any webpage so that I can take notes (Eloquent is an example chrome extension that does this - but it doesn't push the content, it makes the textbox dragable instead - don't like it). Then the notes I take would go to my mongo databases (all done)
But when I add the textbox to the page, I would love to push the main content to te side.
Here's a screenshot of what I have so far
As I said, if I want this to just run on wikipedia for example I could hardcode the element id/class. But is there a way to check for the main content regardless how the developers might have labled it
Unfortunately, there's no way to be absolutely sure for every page on the internet. There are mechanisms to try and signal what is the "main" bit of a page. Two of the "main" ways to do it are
The <main/> tag
The HTML element represents the dominant content of the
of a document. The main content area consists of content that is
directly related to or expands upon the central topic of a document,
or the central functionality of an application.
role="main"
The main landmark role is used to indicate the primary content of a
document. The main content area consists of content that is directly
related to or expands upon the central topic of a document, or the
central functionality of an application.
However, websites aren't breaking any real rules and will still render in most browsers if they don't include either of these. They are mostly ways to help users that require screen readers be able to view content.
You mentioned you were looking at how Wikipedia does it and they use the role="main" mechanism.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
i'm making an iOS app for showing schedule for my college.
I'm kinda new in javascript, i thought it's simple until now. I know this task may be simple and trivial, but listen:
My application generates link with parameters and then creates a dynamic page with an iframe and opens link within it (src of an iframe sets to generated link), link leads to a page on a different domain, it has a HTML table with needed data in it's cells, each cell has it's own attribute, so i thought i could simply find each needed cell by it using DOM, but accessing iframe's DOM doesn't work. I can change absolutely nothing on server side - even college technicians do not know how it works and of course they'll not touch anything until it breakes.
So the question is: how can i get the text from the cells of that table by knowing their attributes and store it as a variable in javascript?
Almost forgot, example of a page itself:
http://ikis.tsogu.ru/shedule/show_shedule.php?action=group&union=0&sid=96&gr=111&year=2015&vr=0
Basically, you cant. Due to same-origin policy. Check out this and this similar questions.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
This is my first attempt at creating a responsive website.
So, I have stylesheets loading depending on the size of device, meaning that some divs may or may not be visible.
One problem that I've encountered is that on mobiles I don't want to show a panel that has content and advertising. The issue I have is that I am still building that panel and making the mobile visitors download it but not displaying it. It's still being loaded and I'm being credited for it, but can't be clicked/seen and I'll have my hand slapped.
So, how do I only load ads (let's say an iframe or javascript) if the div is to be visible? Or even better maybe only load a complete div/panel if it's visible?
Or am I going about this the wrong way?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a list of user posts on a page and there is an icon in the top right of each post. When the user hovers over the icon I want to display additional info about the post, e.g. date, time, author, etc.
I want to display the additional information in an overlay of some kind, and I'm wondering if I should use a jQuery dialog widget or just some javascript. I don't think jQuery tooltips will do the trick, because some of the details are quite long.
Some specifics:
The details should show on hover and disappear when the pointer moves away
The overlay does not need to be modal. It does not require a title bar.
It should appear at the current location of the pointer and should automatically size to fit the content
So, should I be looking at the jQuery dialog widget? Or simply a javascript solution?
Thanks..!
A temporal, non-modal dialog positioned next to the user's cursor is effectively a tooltip. I'd check out one of the more advanced jQuery tooltip plugins like qTip2. It can accomodate many different types of content (images, paragraphs, videos) and is great at scaling to fit large content.
The AJAX example on the demo page should be of particular interest to you.
Good luck!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I had a meeting with our president this morning who was wanting to have our team page function similar to the following app for her Ipad:
http://itunes.apple.com/us/app/appstream-for-ipad/id375288393?mt=8
There is a lot of movement and I am not sure where to really begin. In our case the thumbnails would be pictures of our people and when you clicked the photo a pop up box with description and contact information would be available for the user. I am wondering if anyone has seen a JQuery plugin I could use to simulate this affect or something else I could build on.
Any help would be greatly appreciated.
For anyone that is interested, here is what I wound up doing.
I used a JQuery plugin called "quicksand" for the animation part of it, then set up some an AJAX request on a timer to call a php page with a list of all employees in random order. Give a similar effect to what we were looking for, thanks for all the help.
One way i could think is to just have the thubnail images and then load the appropriate profiles in a fancy box
http://fancybox.net/
Or do it all manually, by having a hidden, absolute positioned Overlay and then present it on click