English 中文(简体)
jqm 不是一个函数
原标题:.jqm not a function

我在jqm 函数上遇到麻烦

<span class="smaller gray">[ <span class="blueonly"><a href="javascript:void(0)" rel="nofollow" onclick="javascript:jQuery( #saved_search_modal ).jqm({modal: false}).jqmShow();" >  . $phrase[ _save_as_favorite_search ] .  </a></span> ]</span> ; 

根据上述函数,当我单击“保存”搜索链接时,它会丢出一个错误,显示:

jjQuery (“# saveed_seard_sear_modal”) 。jqm 不是一个函数

为什么 任何人都可以建议吗?

最佳回答

试试这个

$(document).ready(function(){
// write your code here, related to jqm.
});
问题回答

您应该检查您的插件是否正确和及时装入。 您可以为此使用 Firefox 的 firebug (或其他浏览器的等效) 。

检查 NET 标签, 查看您的外部文件是否正确装入, 并使用调试器在尝试使用前检查它们是否已经装入 。

请注意, 像你的上面一样的内线代码使得调试变得有点困难。 我强烈建议从您的标记中卸下您的 Javascript, 并将其放入外部文件 。





相关问题
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.

热门标签