Phillip Senn
Phillip Senn

Reputation: 47605

Dynamically creating a navbar

I'm creating a string that is an unordered list, and I'd like to replace my navbar.

But I lose my formatting when I say:

$(':jqmData(role=navbar)').html(str).trigger("create");

Upvotes: 0

Views: 1550

Answers (2)

thedjaney
thedjaney

Reputation: 1126

I know this is a little late but it worked for me. Try doing the .trigger('create') on the parent of the navbar element

Upvotes: 1

Phill Pafford
Phill Pafford

Reputation: 85308

does this work?

$(':jqmData(role=navbar)').html(str).navbar();

Upvotes: 2

Related Questions