问题标签 [targeting]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
69 浏览

jquery - 使用 :not 选择器进行 jQuery 定位

我正在尝试获取一个元素的 html,但它的一个子元素除外。

我已经根据其他问题[1] [2](等)进行了尝试,但是 :not selected 似乎不适用于我的情况。

看到这个:http: //jsfiddle.net/GyKr6/1/

在这种情况下,这按预期工作

但我想要生成的html。

我究竟做错了什么?

0 投票
1 回答
246 浏览

facebook-graph-api - 使用 Graph API 发布到页面时定位年龄

我想在使用 Graph API 向 facebook 页面添加帖子时按年龄定位粉丝,我认为我不能使用“定位”字段,因为它提到它用于定位国家、城市、地区或地区。我为照片找到了“feed_targeting”,但没有为帖子找到解决方案。

请帮我 。

0 投票
2 回答
305 浏览

jquery - 在附加元素中查找目标以调用点击事件

我试图让暂停按钮分别在每个跨度中工作。每次用户单击“添加”按钮(代码未显示)时,都会将一<span class="emailform">组新元素附加到<div class="email">. 我不知道如何将单击事件处理程序附加到新添加的元素范围中的暂停按钮。我附上了图片,以便您可以看到我正在尝试做的事情。(我错误地使用 trigger() 以及尝试调用我自己的函数。)

我还在这里包含了一个小提琴

谢谢你的帮助!

html:

jQuery:

原创开始(好)

原始状态

单击“添加”按钮后添加的另一个(好)

添加了一个新的跨度

只能先点击暂停(好)

选择暂停第一个跨度

单击以暂停新添加(坏,没有任何反应)

选择暂停新添加

单击第一个跨度中的暂停按钮(坏 - 现在都被选中并暂停)

都选择了

这就是我想要的结果。 当用户点击添加的 span 中的暂停按钮时,只有这个被暂停,而不是任何其他的。每一个都是分开的。

个人行为

0 投票
3 回答
134 浏览

javascript - jQuery - 针对兄弟姐妹、父母、后代和其他家庭动物

我有一个小标记测试来切换 div 。

一个(工作)模型可以在这里找到:http: //jsfiddle.net/obmerk99/d78aF/1/

问题是,我需要将隐藏/显示链接放在另一个 div 中,如下所示:

http://jsfiddle.net/obmerk99/d78aF/2/

.. 当我移动它时,它对我的​​所有努力都不起作用。

我试过了 :

jQuery(this).next().next('.toggle').toggle('slow');

jQuery(this).next('.toggle').toggle('slow');

还有许多其他人,但这只是反复试验-而我想了解这个家庭的东西(我想我不是一个家庭的人是潜意识的;影响我的编码能力:-))

说到理解,在我的一次试验和错误中,我做了这个:

http://jsfiddle.net/obmerk99/d78aF/5/

这是行不通的,但是突然添加一个小的</br>使它起作用。

http://jsfiddle.net/obmerk99/d78aF/4/

</br>标签是否被视为“兄弟”?

0 投票
0 回答
190 浏览

css - Targeting Browsers in CSS

I'm having a host of problems that I have managed to work around until now.

First, different browsers are responding to different media queries even though they are all being displayed on the same screen. I've managed to work around that problem but now I'm stuck. I have an image that is acting up in Chrome and Firefox. If I fix it in Chrome, it gets out of line in Firefox, if I fix it in Firefox, it breaks down in Chrome.

Right now it is broken in Firefox, since it is easier to try to fiddle with it with Firebug than Chrome. I have tried using vendor specific prefixes, targeting Firefox with Javascript, rewriting media queries--nothing works.

I've never heard of browser windows using different media queries on the same screen, and neither have any of the other folks I've asked. I'd appreciate any help. You can find the problem at www.rachelbrent.com/#about and if anybody looks at the CSS (it's a mess, I know) it's in the base.min.css file and the div in question is img_place_about.

Edit to clarify: It's my image in the "About" section (I'm having some other image issues in the slider up top too. The whole thing is a mess) As far as code goes this is the HTML

And here is the CSS

Original:

Targeting Firefox:

Problem Code:

And what the code should be for Firefox:

Hopefully that helps. I know it is a rambling mess.

0 投票
4 回答
2186 浏览

facebook - 您可以通过 facebook 图形 api 对页面帖子进行门控和定位吗?

在主页的隐私设置中启用帖子隐私门控允许创建具有单独门控和定位的帖子。使能够:

邮政:

现在,我已经能够通过在文档中指定参数 feed_targeting 来获得新闻提要定位以通过 api 工作。

但是,文档中只提到了一次门控:

门控与定位

目前,限制帖子仅限于语言和国家/地区。这与新闻提要定位不同,因为针对某种语言或国家/地区的封闭式帖子不会向超出门控标准的用户显示。使用定位,帖子将在主页上可见,并且仅对主页的定位部分中的人可见。如果用户分享帖子,则用户的朋友将能够看到该帖子,即使他们不在目标设置范围内。

是否可以通过 API 设置门控?

0 投票
4 回答
1208 浏览

.net - 面向 4.0 部署要求的 Async Await

Microsoft 已更新 .net 4.0 的 async/await 目标,现在建议使用nuget上提供的Microsoft.Bcl.Async库。

在发行说明中,它指出需要带有KB 2468871的 .net 4。

  1. KB2468871 是构建要求还是部署要求?
  2. KB2468871 的哪些方面需要它?
0 投票
3 回答
431 浏览

javascript - 如何在行尾定位div?

我正在尝试在 div 行之间插入一个框条,如何定位每行 div 的末尾?

这是 div 的 JSFiddle:http: //jsfiddle.net/5Sn94

这是代码:

一段时间后,div 将进入下一行,创建一个新的“行”。如何在一行 div 下方插入一个跨越整个页面宽度的 div。

为了向您展示我想要实现的目标,请访问 Google 上的此链接:http: //bit.ly/1329rDn

然后你会看到如果你点击任何图像,它会在 div 行之间打开更大的新图像,这是如何实现的?我该怎么做呢?

0 投票
2 回答
1168 浏览

python - Python Targeting System

I am working on a project where I need to program a Raspberry Pi to grab an image from a webcam, search that image for a box and identify what box it is by it's size ratio. The boxes will be a unique color to the rest of the environment. It would also be good to identify the distance from the box and angle to the box.

Everything I've seen seems to indicate that this should be possible, but after several days of searching I have yet to find anything that really helps me to do this. This project is my first experience using Python, so I'm pretty newbish. Any help even with how to do little portions of this would be greatly appreciated.

Here's my working code so far. It's not much, all it does is grab an image from a webcam :/

0 投票
1 回答
79 浏览

windows - 如何针对多个版本的 Windows

我需要编写一个简单的命令行程序,它可以在 Windows XP 上运行(大多数机器都有 SP3,但有些可能没有)一直到 Windows 7。

我希望能够将它编译成一个不需要我安装额外框架(如 .NET 或 Java)的可移植文件。我应该能够将文件拖到机器上并能够单击并运行。我不介意我是否必须为不同版本的 Windows 进行编译,但如果能够编写一个可以全面使用的版本,那就太好了。我不在乎我是否必须用我不熟悉的语言编写它,程序很简单。我应该用什么语言编写代码来实现这一点?

我正在为其开发的朋友对计算机了解不多,但是看着他的示例目标机器,我看到安装了 Java 6 和 Windows Visual C++ 2008 (Windows XP SP3)。作为替代方案,假设这两个框架都安装在所有这些目标机器上,您建议使用哪一个来获得最大的跨平台支持(仅跨 Windows 版本)?

PS 我正在安装 Visual Studio 2012 的 64 位 Windows 7 机器上开发。我有使用 Python、一些 Java 和一些 C# 的经验。

在此先感谢您的帮助!