Skip to content

Commit

Permalink
fix(accordion): make id to be unique in the case of using multiple ac…
Browse files Browse the repository at this point in the history
…cordions on one page
  • Loading branch information
razonyang committed Mar 8, 2024
1 parent d770d58 commit c47af19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/bootstrap/accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{{- else if eq $items false }}
{{- warnf `[bootstrap][accordion] the data file is missing: %s.` $data }}
{{- else }}
{{- $id := printf "accordion-%d-%s" .Ordinal $data | anchorize }}
{{- $id := printf "accordion-%d-%s" time.Now.UnixMicro $data | anchorize }}
<div
class="accordion{{ cond $flush ` accordion-flush` `` }} mb-4"
id="{{ $id }}">
Expand Down

0 comments on commit c47af19

Please sign in to comment.