Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples only use line, can you extend #191

Open
Mashiane opened this issue Apr 26, 2018 · 1 comment
Open

Examples only use line, can you extend #191

Mashiane opened this issue Apr 26, 2018 · 1 comment

Comments

@Mashiane
Copy link

Hi there

The examples provided only show one line to add. e.g. JQuery and no other example shows how to add content via a script that does not read an .innerHTML. Can you please expand on the example that uses JQuery to add more content to the diagram.

Thanks

@bramp
Copy link
Owner

bramp commented Apr 27, 2018

There is no jQuery option that doesn't read the innerHTML. The non-jQuery approach is simple to use in that case.

Really the jQuery was there so you could do something like

<div class="diagram">A->B: Diagram one</div>
<div class="diagram">C->D: Diagram two</div>

// Turn all the divs with the diagram class into diagrams.
$(".diagram").sequenceDiagram(options);

To add multiple lines it should be as simple as:

<div class="diagram">
A->B: Message
B->C: blah
</div>

I would be happy to review a pull request updating the docs, if you think they can be clearer. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants