mootools - Increasing value of Javascript Variables? -
IM processing links to mootools with click events. I have this pattern ID in my HTML: eg toggle_NUMBER Toggle_1 Now I get an ID with this peace of code
My problem starts now: I remove the prefix like this
var TogglePrint = 'toggle_', boxfix = 'page_', Emptyprint = '';
So what should be a simple number like 1, 2 or 3 should be. Now I have tried to increase this number by one
var id_new = parseInt (id) +1;
But that did not work and I do not have any clue how to change it!
The variable "id" is an object, because mootools (and jquery) returns the value of $ function in a The object is.
Try it:
var id_new = $ (This) .get ('id'). Replacement (toggle profiles, emptyprints) + 1;
Comments
Post a Comment