English 中文(简体)
1. 对当前和未来各页内容的植被
原标题:Apply widget to current and future page elements

最新情况:我不得不修改案文,解释我的确切问题。

I have a 3th party library for tooltips. It works like this

j 质量(“a”)。

How can I attach this to all future "a" elements added using ajax on this page ?

最佳回答

我怎么能把这一点附在本页上使用麻ja添加的“a”部分?

公正的呼吁:

jQuery("a").tooltip();

每一名美国宇宙航空研究开发机构电话.success (handler。

如果假想得到适当写,那么就忽视了已经适用于他们的任何联系。 否则,你就不得不改变甄选者,这样,他们就只能听从美国退休人员协会的呼吁中增加的内容。

问题回答

There are several ways:

  1. 将所有有活力的未来要素归入某一类别(如<代码>dnamic),并采用像此这样的中心规则。

    span.dynamic { display: block; }
    
  2. 确保所有动态元素在网页上都有某些母体元素(或至少是具有一定等级的母体元素):

    #dynamicParent span { display: block; }    <-- Select single element by ID
    div.dynamicParent span { display: block; } <-- all divs with this class
    

为此:

$("head").append("<link>");
   css = $("head").children(":last");
   css.attr({
     rel:  "stylesheet",
     type: "text/css",
     href: "link_that_point_to_the_css"
   });




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签