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.

Default Back button with no text #1744

Closed
@StingerID4

Description

@StingerID4

I wanted my default back button to not have any text, just an icon. Turns out you need to add "iconpos='notext'" to a link with no text. Apperantly you can't set this in the options or anything like that. So I put it myself in the code.

I just added to the '_create' function of 'mobile.page' to check if there is no text in the 'backBtnText' variable, then add the iconpos attribute to the a tag.

Perhaps you could use something likewise in a future version?

I changed
var backBtn = $( "<a href='#' class='ui-btn-left' data-"+ $.mobile.ns +"rel='back' data-"+ $.mobile.ns +"icon='arrow-l'>"+ o.backBtnText +"</a>" ).prependTo( $this );
to
var backBtn = $( "<a href='#' class='ui-btn-left' data-"+ $.mobile.ns +"rel='back' data-"+ $.mobile.ns +"icon='arrow-l' " + (!o.backBtnText ? "data-iconpos='notext'" : "") + ">"+ o.backBtnText +"</a>" ).prependTo( $this );

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions