|
176 | 176 | * default scrtabs-tab-scroll-arrow classes.
|
177 | 177 | * This plunk shows it working with svg icons:
|
178 | 178 | * http://plnkr.co/edit/2MdZCAnLyeU40shxaol3?p=preview
|
| 179 | + * |
| 180 | + * When using this option, you can also mark a child |
| 181 | + * element within the arrow content as the click target |
| 182 | + * if you don't want the entire content to be |
| 183 | + * clickable. You do that my adding the CSS class |
| 184 | + * 'scrtabs-click-target' to the element that should |
| 185 | + * be clickable, like so: |
| 186 | + * |
| 187 | + * leftArrowContent: [ |
| 188 | + * '<div class="scrtabs-tab-scroll-arrow scrtabs-tab-scroll-arrow-left">', |
| 189 | + * ' <button class="scrtabs-click-target" type="button">', |
| 190 | + * ' <i class="custom-chevron-left"></i>', |
| 191 | + * ' </button>', |
| 192 | + * '</div>' |
| 193 | + * ].join(''), |
| 194 | + * rightArrowContent: [ |
| 195 | + * '<div class="scrtabs-tab-scroll-arrow scrtabs-tab-scroll-arrow-right">', |
| 196 | + * ' <button class="scrtabs-click-target" type="button">', |
| 197 | + * ' <i class="custom-chevron-right"></i>', |
| 198 | + * ' </button>', |
| 199 | + * '</div>' |
| 200 | + * ].join('') |
| 201 | + * |
179 | 202 | * enableRtlSupport:
|
180 | 203 | * set to true if you want your site to support
|
181 | 204 | * right-to-left languages. If true, the plugin will
|
|
477 | 500 |
|
478 | 501 | // if we have custom arrow content, we might have a click target defined
|
479 | 502 | if (settings.leftArrowContent) {
|
480 |
| - $leftArrowClickTarget = $leftArrow.find('[scrtabs-click-target],[data-scrtabs-click-target]'); |
| 503 | + $leftArrowClickTarget = $leftArrow.find('.scrtabs-click-target'); |
481 | 504 | }
|
482 | 505 |
|
483 | 506 | if (settings.rightArrowContent) {
|
484 |
| - $rightArrowClickTarget = $rightArrow.find('[scrtabs-click-target],[data-scrtabs-click-target]'); |
| 507 | + $rightArrowClickTarget = $rightArrow.find('.scrtabs-click-target'); |
485 | 508 | }
|
486 | 509 |
|
487 | 510 | if ($leftArrowClickTarget && $leftArrowClickTarget.length) {
|
|
0 commit comments