jQWidgets Forums

jQuery UI Widgets Forums Angular jqxMenu add image runtime

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 6 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxMenu add image runtime #102477

    Digger44
    Participant

    Hello!

    Can you help me how to add an image to the menu item in runtime.

    I add the data as follows:

    private myMenuSettings: jqwidgets.MenuOptions =
    {
    theme: ‘bootstrap’,
    width: “120”,
    height: “58”,
    source: this.myMenuSource,
    }

    this.myMenuSource[0] = { label: “add”, value: “add” };
    this.myMenuSource[1] = { label: “delete”, value: “delete” };

    jqxMenu add image runtime #102512

    Hristo
    Participant

    Hello Digger44,

    You could try to update the source with the new values.
    It is possible to add new items with html field:
    let newSource = [{ label: 'Item 1', value: 1, html: '<img src="item1.jpg">' }]

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.