Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

scrollview - new option - innerHeight #1345

Closed
@mattsahr

Description

@mattsahr

When using jQueryMobile's scrollview, instead of requiring the HTML markup to include a <div class="view">, and requiring a CSS or style declaration to get its height correct, scrollview could include another option, for example...

<div data-scroll="y" data-scroll-innerheight="500">...</div>

which could parse in scrollview.js to:

var innerHeight = $this.jqmData("scroll-innerheight");
if (innerHeight)
    opts.innerHeight = innerHeight;

Then in jquery.mobile.scrollview.js, when we call a new scrollview, you could add a bit to the _create function after $child has been created, to say...

if (options.innerHeight)
    $child.css('height', options.innerHeight);

It seems like the inner height would be friendlier if it could be reduced to an option, but users could go either way. Declare the "data-scroll-innerheight" to automate it, or leave it out and define your own class="view" styles.

Obviously, this could also be used for an innerWidth option.

I have been using scrollview a LOT, and I think it's great. Thanks for the amazing work.

Activity

ghost assigned on Apr 12, 2011
toddparker

toddparker commented on Sep 27, 2011

@toddparker
Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @toddparker@jblas@mattsahr

      Issue actions

        scrollview - new option - innerHeight · Issue #1345 · jquery-archive/jquery-mobile