Twitter header battery

I would like to get the following effect using twitter bootstrap. One link for a collapse action and another link for another action:

example

Now I get this by setting another link with the pull-right class and adding an element. Is there a better way?

Here is the code that matters (sorry, but it's in jade, anyway, I think it's easy to understand)

div.accordion-heading div.row-fluid div.span6 a.accordion-toggle(href="#", data-parent="main-accordion", data-toggle="collapse")= "Collapse Link" div.span6 a.pull-right(style="padding:8px 15px")= "Another Link" 

Best wishes

+6
source share
1 answer

You can get a little cleaner with this:

 div.accordion-heading div.accordion-toggle.group-accordion-toggle a(href="#", data-parent="main-accordion", data-toggle="collapse")= "Collapse Link" a.pull-right= "Another Link" 

And this (to avoid the pointer everywhere):

 .accordion-toggle.group-accordion-toggle { cursor: inherit; } 

Demo (jsfiddle)

+5
source

Source: https://habr.com/ru/post/921755/


All Articles