如何手动触发棘轮推? [英] How do I trigger Ratchet's push manually?
本文介绍了如何手动触发棘轮推?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个进行搜索的链接.到目前为止,它正在工作.问题是当我希望通过单击输入"按钮完成搜索时.所以:
I have a link which makes a search. So far, it's working. The issue is when I want the search to be done through hiting the 'enter' button. So:
$('#searchedText').on('keypress', function(e) {
console.log("writed");
if ($(this).val().trim().length > 2) {
if (e.which == 13) {
console.log("Passed condition");
app.search = $('#searchedText').val();
// HERE'S WHERE I NEED TO TRIGGER RATCHET's PUSH
}
}
});
我尝试更改window.location-不起作用 我试图触发水龙头&点击事件-不起作用
I tried to change window.location - Doesn't work I tried to trigger tap & click event - Doesn't work
有什么想法吗?
谢谢.
推荐答案
如果有人需要解决方案,我最终发现了棘齿问题(github).如果您想触发自定义推送,请执行以下操作:
If anyone needs a solution for this, I finally found on the Ratchet's issues (github). If you wanna trigger a custom push, just do:
PUSH({url: 'YourUrl+hash', transition: 'slide-out'});
致谢
这篇关于如何手动触发棘轮推?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文