Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unique class to current slide & its title #2

Closed
MattKohnen opened this issue May 19, 2013 · 4 comments
Closed

Add unique class to current slide & its title #2

MattKohnen opened this issue May 19, 2013 · 4 comments
Assignees

Comments

@MattKohnen
Copy link

Will allow convenient CSS targeting.

For example, output would be:

<h1 id="steps-uid-1-0" tabindex="-1" class="active title" style="display: block;">First Step</h1>

<div class="active body" style="display: block;">
    First Content
</div>
@rstaib
Copy link
Owner

rstaib commented May 19, 2013

@MattKohnen why do you need this? Could you maybe explain me what the benefit would be? Thanks.

@MattKohnen
Copy link
Author

Hi Rafael,

Thanks for this plugin, by the way.

So I am showing the ".title" of the active slide and hiding the rest. I
was able to achieve this via your API + CSS. Just thought it might be
convenient for others if they were able to hook into the active slide &/or
title.

Matt

On Sun, May 19, 2013 at 11:45 AM, Rafael J. Staib
notifications@github.comwrote:

@MattKohnen https://github.com/mattkohnen why do you need this? Could
you maybe explain me what the benefit would be? Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-18119617
.

@rstaib
Copy link
Owner

rstaib commented May 20, 2013

Hi Matt,

Don’t mention it ;-) I thought it is time to give the open-source community something back. There are so many good plugins and libraries out there which helped me a lot.

Your approach is quite interesting because I never considered people want to show the active title. I actually using the title for accessibility reasons and for people who disabled javascript (nobody is doing that quite sure but nevertheless I think it is pretty important try to cover all cases).

And of course to hook into a active tab is very useful too.

So I will add one class for active title and body in one of my next changes.

Many thanks Matt.

@ghost ghost assigned rstaib May 20, 2013
rstaib pushed a commit that referenced this issue May 21, 2013
- Make css class for the outer component wrapper editable
- Add saveState option flag to persist last active step position
- Add current class to step title and body for convinient css targeting
#2
- Fixed a bug related to startIndex
- Fixed a bug related to focusing after stepChanges
@rstaib
Copy link
Owner

rstaib commented May 21, 2013

The class name which indecates that the title and body is active is called current. Have fun ;-)

@rstaib rstaib closed this as completed May 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants