blackberry / jQueryMobile-BB10-Theme

jQuery Mobile BlackBerry 10 Theme
Apache License 2.0
72 stars 56 forks source link

.load for actionbar menu #3

Closed PhilipKirkbride closed 11 years ago

PhilipKirkbride commented 12 years ago

The actionbar menu will not work when loaded in with

 $('#footer').load('includes/footer.html');
jasondscott commented 11 years ago

Hi @PhilipK-ca

Can you give me an example of what footer.html would look like?

Thanks

PhilipKirkbride commented 11 years ago

Here is the code ...

        <div data-role="actionbar">
                <div data-role="back"></div>
                <div data-role="action">
                    <img src="img/generic_81_81_placeholder.png" alt="" />
                    <p>6 test</p>
                </div>
                <div data-role="action">
                    <img src="img/generic_81_81_placeholder.png" alt="" />
                    <p>7 test</p>
                </div>
                <div data-role="action" data-overflow="true" onclick="javascript:location.href='kanji.html'">
                    <img src="img/generic_81_81_placeholder.png" alt="" />
                    <p>Mastered List</p>
                </div>
        </div>

And here is a picture of what it would look like.

Screen Shot 2012-12-19 at 3 34 29 PM

Though I'm not sure if this is exclusively a BB10-Theme issue. I've had many issues with styling not being applied correctly when you manipulate content using Javascript after the page has been loaded. So this might be more of a JQM issue.

Though it would be nice if we could use .load to centralize content in large JQM applications.

PhilipKirkbride commented 11 years ago

There is now a section in the docs on how to load in menu items dynamically with '.html' command.

https://github.com/blackberry/jQueryMobile-BB10-Theme/tree/master/docs