- 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.
推薦閱讀
- Kubernetes修煉手冊
- Learning OpenDaylight
- Linux系統架構與運維實戰
- Learning Android Intents
- Windows Server 2012 Hyper-V Cookbook
- Linux系統安全基礎:二進制代碼安全性分析基礎與實踐
- 完美應用RHEL 8
- INSTANT Migration from Windows Server 2008 and 2008 R2 to 2012 How-to
- 操作系統分析
- Advanced TypeScript Programming Projects
- 計算機系統的自主設計
- Windows Server 2008組網技術與實訓(第3版)
- Linux應用大全 基礎與管理
- 大規模分布式系統架構與設計實戰
- Agile IT Security Implementation Methodology