Reputation: 10781
I have an object in Jquery and I want to set the element page to 100 for example, how can I do that with jquery?
var options = {
valueNames: [ 'name', 'category' ],
page: 3,
plugins: [
[ 'paging' ]
]
};
Thanks.
Upvotes: 1
Views: 3048
Reputation: 6512
You don't need jQuery to change the option property value.
options.page = 100;
Upvotes: 0
Reputation: 337560
No jQuery required as that is a POJS object. Assuming you mean that you want to change the page
property after the object is created this will work:
var options = {
valueNames: [ 'name', 'category' ],
page: 3,
plugins: [
[ 'paging' ]
]
};
options.page = 100;
Upvotes: 2