- Mastering Reactive JavaScript
- Erich de Souza Oliveira
- 62字
- 2021-07-09 20:33:08
Subscribing using the assign method
The assign() method lets you call a function on an object every time an event occurs. It is especially useful to set the content of DOM elements. You can use it to set the value of a DOM object class using jQuery:
observable
.assign($("#myElement"), "class");
The assign() method is just a synonym for the onValue() method.
推薦閱讀
- Linux運維之道(第3版)
- Linux性能優化
- Linux集群和自動化運維
- 深入Linux內核架構與底層原理(第2版)
- Windows Phone應用程序開發
- Windows Server 2012網絡操作系統企業應用案例詳解
- Windows 7中文版從入門到精通(修訂版)
- Mastering Reactive JavaScript
- Linux設備驅動開發
- Red Hat Enterprise Linux 6.4網絡操作系統詳解
- Windows 7實戰從入門到精通
- Linux應用大全 基礎與管理
- Linux網絡操作系統項目教程(RHEL 7.4/CentOS 7.4)(第3版)(微課版)
- Linux操作系統案例教程(第2版)
- Mastering Sass