$("#plus_button").bind('click',function (e) { // Get all elements of @class "resizable" $(".resizable").each(function () { var resizableClass = $(this ).attr("class"); // Strip out "resizable" from class to get the size value var sizeValue = resizableClass.replace(/ resizable/, ''); // Extract size value formulaSizeClassPrefix = sizeValue.split('_')[0]; existingFormulaSize = Number(sizeValue.split ('_')[1]); newFormulaSize = existingFormulaSize + 1; if (newFormulaSize > 5) { alert("Formulas already displayed at maximum size"); // Exit jQuery each() loop return false ; } else { newFormulaSizeClass = formulaSizeClassPrefix + '_' + String (newFormulaSize); // Reconstruct new @class attribute and update element newClassAttribute = newFormulaSizeClass + " resizable"; $(this ).attr('class', newClassAttribute); } }); }); $("#minus_button").bind('click',function (e) { // Get all elements of @class "resizable" $(".resizable").each(function () { var resizableClass = $(this ).attr("class"); // Strip out
advert
Friday 31 March 2017
About Gp
Templatesyard is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates which are professionally designed and perfectlly seo optimized to deliver best result for your blog.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment