cloudfour / cloudfour/SimpleSlideView

Determine default changeView behavior based on source order

未关闭
#10 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
HTML
星标
257
派生
31
PR 合并指标
30 天内没有已合并 PR

描述

Currently, the `changeView` method _requires_ a value for the `action` argument of either `"push"` or `"pop"`.

It would be nice if the source order of the views could determine the action to take in cases where that value is not provided. This could be accomplished by comparing the value of `@$views.index(@$activeView)` with the value of `@$views.index($targetView)`.

This could also allow us to add a new data-attribute, `data-changeview`, which could do _either_ a push or pop depending on the source order.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start at the `changeView` method and inspect how `@$views`, `@$activeView`, and `$targetView` are used to select an action. Implement the proposed source-order behavior when `action` is omitted, then verify that a `data-changeview` attribute can trigger either push or pop based on that order.

由索引模型根据 Issue 内容生成。

评估

技术栈
jquery
领域
frontend
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。