开发者

Maintaining a reference to the facebox element

开发者 https://www.devze.com 2023-01-29 19:39 出处:网络
I am using the facebox plugin in jQuery. I would like to maintain a pointer to it after I have triggered it, so that i can transform the elements in it, etc.

I am using the facebox plugin in jQuery. I would like to maintain a pointer to it after I have triggered it, so that i can transform the elements in it, etc.

Here is what i want to do, but facebox() returns a nil.

I kno开发者_运维问答w i can call "#facebox .xxx", but that always makes me squeamish

//fb is a pointer to the facebox
fb  =$.facebox("facebox")
fb.find("textarea").text("custom text here")


Fadebox depends on there being a single #facebox element in the page, you can use #facebox as your selector here without any issues here...the plugin doesn't leave much alternative, just do:

$("#facebox textarea").text("custom text here")
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号