Select2 jquery tutorial - reset and empty value (select2 v.3.5 and v.4)

Subscribers:
4,970
Published on ● Video Link: https://www.youtube.com/watch?v=JSoXxXmTvuo



Category:
Tutorial
Duration: 2:59
9,863 views
18


in this video i will show you how to reset value select2 jquery. So simple, just add the following script :
$("#address").select2('val', '');
$("#address").html('');

in your javascript ..

that script works on select2 v.3.5.3 and also v.4.0

---
see this video for details.




Other Videos By Ambar Hasbiyatmoko


2017-08-17Codeigniter(PHP) Error - mysqli: Headers and client library minor version mismatch.
2017-08-13Ubuntu server error - RTNETLINK answers: File exists, Failed to bring up enp0s8
2017-08-04Android Studio Error - app.MainActivity has leaked window com.android.internal.policy
2017-08-04Android Studio Error (Gradle) - Could not find method compile() for arguments [com.android.volley]
2017-07-20Laravel 5.2 error - [InvalidArgumentException] Please provide a valid cache path.
2017-07-12PHP error - SSL operation failed .. OpenSSL error:14090086:.. get serve:certificate verify failed
2017-06-18Create https localhost (ssl) on ubuntu 16.04
2017-06-14Dual boot problem - Error: no such partition. Entering rescue mode.
2017-06-13ssh problem (ssh-add) - Permissions 0777 for ' ssh id_rsa' are too open.
2017-06-12Laravel 5.4 error - file_put_contents(cache services.php) failed to open stream. Permission denied
2017-06-11Select2 jquery tutorial - reset and empty value (select2 v.3.5 and v.4)
2017-06-01Virtualbox - bootable (Ubuntu16.04 live) from flashdisk with Plop boot manager
2017-05-28Plop boot manager problem (on Virtualbox) - port 1 device connected. then hangs & freeze
2017-05-26Laravel error - Uncaught exception 'ReflectionException' with message Class App\Http\Kernel
2017-05-26Virtualbox problem - Host only network not work on Ubuntu server 16.04
2017-05-25Teamviewer error (on Ubuntu) - The TeamViewer daemon is not running!
2017-05-20Laravel 5.4 (on ubuntu) - Simple laravel CRUD from scratch [part 3]
2017-05-20Ubuntu 16.04 (Steam error) - The cache has no package named 'steam'
2017-05-14Ubuntu 14.04 - perl: warning: Please check that your locale settings: LANGUAGE = (unset)
2017-05-14Laravel 5.4 - how to use laravel datatables (yajra v.7.0)
2017-05-12Laravel 5.4 - How laravel works (simple flow) - [part2]



Tags:
select2
jquery
dropdown
reset
value
empty
javascript
script
localhost
browser
error
problem
html
tutorial