Skip to content

Tag: jquery

Using variable outside of a javascript function

I am redesigning the select dropdown of a site and I am using a jQuery plugin called ddSlick. However, I can’t seem to capture a variable I need outside its function. In the code below I can’t seem to have the second console.log(build) show what I get in the first console.log(build). I get undefin…

How to sort list by Persian alphabet?

How can I read testArrray in ul li and sort this list? lis.sort(function(a,b)) has English/Arabic/and alphabet support, not Persian alphabet support. Help me please. Thank you Answer String#localeCompare is supposed to be locale-aware and compare strings appropriately, so: Live Example: You may need to pass s…

How to get value of bootstrap switch

I’m using bootstrap switch & i want to get checkbox value on click on switch. I’ve tried this but i din’t get the value. Could you check my code bellow & let me know where i did wrong Answer Tamara, Bootstrap Switch has an onSwitchChange property that will be able to give you the sta…