JavaScript links and SEO?

First, take a look at this demo page: http://vidasp.net/tinydemos/seo-javascript-links.html There is a menu on the page, and clicking on a menu item will display various links to other web-pages (that are part of the web-site). The link URLs are in this format: www . foo . com / articles / XXX / descriptive-title-of-the-article ... where XXX is a three-digit ID of the given article. This a

JavaScript链接和SEO?

首先,看看这个演示页面:http://vidasp.net/tinydemos/seo-javascript-links.html 在页面上有一个菜单,点击一个菜单项将显示到其他网页(这是网站的一部分)的各种链接。 链接网址采用以下格式: www . foo . com / articles / XXX / descriptive-title-of-the-article ...其中XXX是给定文章的三位ID。 这一切似乎都没问题,但有一个问题:所有这些链接都是通过JavaScript动态创建的。 看看源代码 - 在页面底部有一个J

How to include JQuery in a javascript file without conflicts

Possible Duplicate: Dynamically Including jQuery using JavaScript if it's not already present I am making a site similar to google analytics in that I have my users paste a bit of javascript code on their site. My Question is how can I manage to include JQuery in my javascript snippet of code? I already know how to include files using js: How do I include a JavaScript file in another J

如何在没有冲突的JavaScript文件中包含JQuery

可能重复: 动态地使用JavaScript包含jQuery,如果它尚不存在 我正在建立一个类似于谷歌分析的网站,我的用户在他们的网站上粘贴了一些JavaScript代码。 我的问题是我如何设法在我的JavaScript代码片段中包含JQuery? 我已经知道如何使用js包含文件:如何在另一个JavaScript文件中包含JavaScript文件? 但是,我如何确保没有JQuery冲突? 金星给任何建议生成嵌入式javascript代码的良好实践的人:) 简短的回答是:你

How to center a facebook iframe like button

I need a global solution to center a facebook iframe like button which can have different like urls and different locales (and languages - in my case 40+). So the button will have different widths in the end. According to that I removed the width attribute and added the locale param. The iframe gets 300px wide and its not possible to center it. See the problem in this example: .mydiv {

如何中心一个Facebook的iframe像按钮

我需要一个全局解决方案来集中一个像iframe一样的按钮,它可以具有不同的URL和不同的语言环境(和语言 - 在我的情况下是40+)。 所以这个按钮最后会有不同的宽度。 据此我删除了宽度属性并添加了语言环境参数。 iframe的宽度为300px,不可能居中。 看到这个例子中的问题: .mydiv { padding: 30px 0; background: red; text-align: center; } .mydiv span { font-family: sans-serif; text-decoration: u

Like Plugin: How to show like button for posts made on facebook itself?

Situation: I render the wall of a Facebook user on a external website (parsing the wall through graph.facebook.com). Now I want to add like buttons to mimic the 'like' feature on the original wall, however this doesn't work. What I've tried: Fetch post url and render iframe as: https://www.facebook.com/plugins/like.php?href=http://www.facebook.com/1108322393/posts/2358906464742

喜欢插件:如何显示像在Facebook上发布的帖子按钮本身?

情况:我在外部网站上渲染Facebook用户的墙(通过graph.facebook.com解析墙)。 现在,我想添加按钮来模仿原始墙上的“喜欢”功能,但这不起作用。 我试过的:取帖子网址并渲染iframe为:https://www.facebook.com/plugins/like.php?href=http://www.facebook.com/1108322393/posts/235890646474224 问题:是否可以为来自Facebook本身的帖子渲染一个类似的按钮? 如果是这样,怎么样?

How can I close the Foundation topbar menu when a link is clicked?

I am using Zurb Foundation's fixed topbar on my single page site, and it contains anchor links to places within the page. I would like it so that whenever a link inside the expanded mobile menu is clicked, the menu closes. Currently, when a link is clicked, the page scrolls, but the menu is left open at the top of the page out of view. In a previous version of Foundation, I was able to r

单击链接时如何关闭Foundation的顶栏菜单?

我在我的单页网站上使用Zurb基金会的固定顶栏,并且它包含页面内地点的锚链接。 我希望这样,只要点击扩展移动菜单中的链接,菜单就会关闭。 目前,点击链接时,页面会滚动,但菜单在页面顶部保持打开状态。 在之前的Foundation版本中,我能够对代码进行反向工程并找到一个简单的解决方案。 自从更新到4.3.1来修复顶栏的另一个问题后,由于我对javascript的知识有限,我无法找到解决方案。 顶栏 在我看来,如果点击菜

Changing default starting position of #anchor

I have a URL with an anchor that is working as it should: site.com/item/id#comment-233 When opened, the anchor will be positioned at exactly the top of the page. How do I change the starting point? Let's say I want it to be 50px down from the top. The reason I'm needing this is because I have fixed layers at the top of the page, so the comment is appearing overlapped behind the fix

更改#anchor的默认开始位置

我有一个正在工作的锚链接,网址为: site.com/item/id#comment-233 打开时,锚点将定位在页面的顶部。 我如何改变起点? 假设我希望它从顶部向下50px 。 我需要这个的原因是因为我在页面顶部有固定图层,所以评论出现在固定标题div后面。 以防万一,由于跨浏览器的兼容性,我更喜欢一个解决方案,不涉及将注释的容器更改为固定和定位顶部减去标题的高度。 假设你的<a>标签没有内容,添加一个类给它,标签的pos

Update query that handles duplicates and increment operator

Background: I have an update query on collection called alerts that runs each time a "flow" is received. I have an array of objects in my alert's document called blacklistedCommunication . What should happen: When a new flow arrives, then the alerts doc is updated only if the flow's client_addr and server_addr are not already present in blacklistedCommuication . While a

更新处理重复项和增加运算符的查询

背景: 每次收到“流量”时,我都会收集一个名为alerts集合的更新查询。 我的警报文档中有一个名为blacklistedCommunication的对象数组。 应该发生什么: 当新流程到达时, alerts文档仅在流程的client_addr和server_addr尚未blacklistedCommuication 。 与此同时,如果我们发现重复,它应该只增加flowCount 。 当前查询: 如果以下更新查询不存在,则将新对象推送到blacklistedCommunication对象。 但是,如果它确

jQuery Mobile: document ready vs. page events

I am using jQuery Mobile, and I am having trouble understanding differences between classic document ready and jQuery Mobile page events. What is the real difference? Why should <!-- language: lang-js --> $(document).ready() { }); be better than $(document).on('pageinit') { }); What is the order of page events, when you transition from one page to another? How can I send data f

jQuery Mobile:文档准备与页面事件

我正在使用jQuery Mobile,并且我无法理解经典文档就绪和jQuery Mobile页面事件之间的差异。 真正的区别是什么? 为什么要 <!-- language: lang-js --> $(document).ready() { }); 比...更好 $(document).on('pageinit') { }); 当您从一个页面切换到另一个页面时,页面事件的顺序是什么? 如何将数据从一个页面发送到另一个页面,是否可以访问上一页中的数据? jQuery Mobile 1.4更新: 我原来的文章是针

Windows 8 Metro Settings Flyouts don't seem to work in Javascript?

I've recently been trying to create a metro app for Windows 8 and tried to use settings flyout. So I followed msdn quickstart: http://msdn.microsoft.com/en-us/library/windows/apps/hh780611.aspx However, I can't make it work. Here's the part where I add the settings flyout: function setupSettings() { app.onsettings = function (e) { e.detail.applicationcommands = { 's

Windows 8 Metro Flyouts在Javascript中似乎不起作用?

我最近一直试图为Windows 8创建一个地铁应用程序,并尝试使用设置弹出窗口。 所以我跟随msdn quickstart:http://msdn.microsoft.com/en-us/library/windows/apps/hh780611.aspx 但是,我无法让它工作。 以下是我添加设置弹出​​窗口的部分: function setupSettings() { app.onsettings = function (e) { e.detail.applicationcommands = { 'serv_changer': { title: 'Change Server', href: 'settings.html'

JavaScript get clipboard data on paste event (Cross browser)

How can a web application detect a paste event and retrieve the data to be pasted? I would like to remove HTML content before the text is pasted into a rich text editor. Cleaning the text after being pasted afterwards works, but the problem is that all previous formatting is lost. For example, I can write a sentence in the editor and make it bold, but when I paste new text, all formatting is

JavaScript获取粘贴事件的剪贴板数据(跨浏览器)

Web应用程序如何检测粘贴事件并检索要粘贴的数据? 我想在将文本粘贴到富文本编辑器之前删除HTML内容。 事后粘贴后清理文本的工作,但问题是,所有以前的格式丢失。 例如,我可以在编辑器中编写一个句子并使其变为粗体,但是当我粘贴新文本时,所有格式都会丢失。 我想只清理粘贴的文本,并保留以前的格式不变。 理想情况下,该解决方案应该适用于所有现代浏览器(例如,MSIE,Gecko,Chrome和Safari)。 请注意,MSIE