CalcBuilder Forum

Hide delete button section

User bsnline 2015-06-28 14:13:11

Hi,

Please help me , code javascript to hide button delete only some section ?
Thank you

Moonsoft support 2015-06-29 10:04:38

Hi,
you could use the function hide() to hide from user view any element of the calculator. If you insert the element inside a div with id="mydiv" for ex, you can hide it using:

CB("#mydiv").hide();


Hope this helps, regards

User bsnline 2015-06-29 23:21:22

Hi,

Okay for hide div class,
but I want to hide the button

"Remove"

i tried :

CB("#cb_delete").hide();

but not work

suggestion ?

thank you

Moonsoft support 2015-06-30 09:50:52

Hi,

To hide all delete buttons, selector should be class:

CB(".cb_delete").hide();

This will hide all delete buttons in all sections in your page. But if you want to hide buttons only in some sections, you should enclosure your section in a div with id (for example id="mysection"), and then add it to selector:

CB("#mysection").find(".cb_delete").hide();

This will only hide delete buttons on section selected.

Regards,

Moonsoft Team

User bsnline 2015-06-30 19:51:59

Hi, thank you for reply
I tried both solution but not work.

CB(".cb_delete").hide();
CB("#mysection").find(".cb_delete").hide();

Moonsoft support 2015-07-01 09:20:16

Hi,
are you/user creating sections dinamically? Then the js code won't affect, as it executes once as soon as the page is ready. If this is your case, you can try to add css classes instead. You can use any css present at the page, the calcbuilder one, or add styles directly at the js tab 'write directly in html page'. You can add there style tags with the classes needed.

Hope this helps, regards

...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!