Set option via Javascript variable

Set option via Javascript variable

ASKempASKemp Posts: 19Questions: 7Answers: 0

Trying to set an option via a javascript variable but doesn't seen to like it.
e.g. where isResponsive is a Boolean, either true or false

neither
responsive: isResponsive
nor
responsive: isResponsive ? true : false

seems to set the option as appropriate.
What am I missing?

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,154Questions: 26Answers: 4,919
    edited August 2019 Answer ✓

    Using a variable to control Responsive works here:
    http://live.datatables.net/kevigezo/1/edit

    You can change the variable to false to see that responsive is not enabled. If you continue to have problems please update or post a test case replicating the issue.

    Take a look at your browser's console for errors.

    Kevin

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi ASKemp,

    I've made an example to show this working here. Hopefully that helps, if it doesn't, feel free to edit that example to show your specific issue.

    Hope this helps,
    Sandy

  • ASKempASKemp Posts: 19Questions: 7Answers: 0

    Many thanks both for confirming that, much appreciated.

This discussion has been closed.