如何禁用/启用一个不在表单中而是在导航栏中的按钮?我尝试了一些例子,但都失败了。
我正在改变我的文本区域文本
$("textarea").val(x);
文本正在改变,问题是它没有自动重新调整大小,我看到了难看的滚动条在侧边,如果我手动调整它,就可以解决…有没有一种方法来强制刷新或类似的东西?
谢谢
Update (TextArea):
If i click on the text area and then press any key -> it opens up as should be, I'm trying to simulate it .. but fail , the binding is works , but the trigger for keypress/keydown doesn't , I tried some codes from googling, this should work , I think , mayb for nomral jQuery 1.6 , but not jQuery mobile.. My test are are on Chrome and iPhone 4
$('#textarea').bind('click', function() {
var e = jQuery.Event("keypress", { keyCode: 64 });
$(this).trigger( e );
});