基于 URL 使用 jQuery 定制 Forumotion 配置文件
这个想法是有一个 jQuery 片段(我喜欢 Jquery...我可以比常规 javascript 更好地理解它),当它在具有诸如“http://customize.forum-motion.com/profile.forum?mode=viewprofile&u=1 ”(仅作为示例)...然后在检测到它是配置文件的 url 后...从特定(并且很可能隐藏)元素中获取数据,然后将该数据包装在 css 标记中并附加它到当前文档的标题。
简而言之,我试图弄清楚如何制作一种配置文件自定义系统,用户可以在其中创建自己的 CSS。到目前为止,我遇到的最大问题是弄清楚如何制作它,以便代码片段可以找出它正在运行的 URL。 jQuery 中有没有一个函数可以做到这一点?
The idea is have a jQuery snippet (I like Jquery...I can understand it better then regular javascript) that will detect that when it has been run on a profile with a url such as "http://customize.forum-motion.com/profile.forum?mode=viewprofile&u=1" (just as an example)...then upon detecting that it is a url of a profile...fetch data from a specific (and most likely hidden) element before wrapping that data in css tags and appending it to the heady of the current document.
In short I'm trying to figure out how to make a sort of profile customization system where users can create their own css. The biggest problem I am having so far is figuring out how to make it so that the snippet can figure out what URL its being run on. Is there a function that can do this in jQuery at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要获取当前 URL:
还有一个用于 URL 处理的插件。另请参阅:
在 JavaScript 中获取当前 URL?
To get the current URL:
There's a plugin for URL processing too. See also:
Get current URL in JavaScript?