问题标签 [jquery-easing]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
2273 浏览

jquery - 将 jQuery 缓动代码从 ul li 转换为 table

在这里,我有一个 jQuery 缓入/缓出功能,我试图将它从 ul li 转换为 table,但它对我不起作用。

我想知道除了将我的主要 ul 类从.topnav li替换为.topnav tr td之外,我还需要做哪些更改

我之前使用过这个html:

然后我把它改成这样的表:

但到目前为止还没有运气。根本没有用。更改中可能缺少某些内容或有问题...

任何想法?

0 投票
0 回答
537 浏览

jquery - 与 jQuery 缓动、县和 lavalamp 插件冲突?

我在我正在工作的站点中使用 jQuery 缓动、县和 lavalamp 插件。使用 lavalamp 插件的菜单不起作用.. 实例化代码是

Firefox 显示的错误是这样的,

虽然是这样,但我放置了一个使用县插件的计时器

同样的事情发生了,

但是这两个插件在他们自己单独的 demo.html 文件中工作得很好。

我在头部的文件顺序

script.js 通常是我初始化插件的地方。

此外,我包含的 jquery.js 是 jquery-1.10.2.js 但我的整个网站在没有这个的情况下表现得很奇怪,

这不应该与我的 jquery.js 文件具有相同的目的吗?

编辑:刚刚意识到 lavalamp 插件使用 easing.js,如果使用 easing.js,县级插件将不起作用.. Firefox 代码:

0 投票
1 回答
1645 浏览

jquery - 未捕获的类型错误:对象# has no method 'easeOutCubic'

There are slightly less than a billion similar questions on SO, with about the same number of reasons for the error. I just don't seem to find mine.

Kwicks accordian and the jQuer

There are slightly less than a billion similar questions on SO, with about the same number of reasons for the error. I just don't seem to find mine.

Kwicks accordian and the jQuery Easing plugin have been working for some time on my site and I'm unaware of any change that I have made that would cause them to misbehave:

http://donmorris.com

My console is showing two errors as I move my mouse over the accordian:

These seem to point to jquery.easing.js not being loaded, but that doesn't seem to be the case. Could someone here with sharper eyes please point out my mistake?


User login session variable. Is it possible to spoof session variable? PHP

When user logs in I use the following strategy to authenticate user:

  1. Username and Password are present in database along with unique Token and Session Identifier
  2. Set session variable $_SESSION['logged_in'] = true if above returns true
  3. On every page (basecontroller) checks if ($_SESSION['logged_in'] > 0) otherwise redirects to login page.

Is it possible that a hacker might somehow set $_SESSION['logged_in'] = true; ? Do I have a security issue with the above strategy?

Please give me an article or anything that can help me make it more secure.

0 投票
3 回答
152 浏览

jquery - jQuery 动画为任何值做同样的缓动效果

我想用 jquery 做一个简单的动画,但它一直在做同样的缓动效果,我不能改变它。

我的代码就是这么简单。当我触发它时,它只是开始缓慢而快速地跳转到结束。我再次下载了 jquery ui 库,仔细检查是否选择了所有功能。

0 投票
2 回答
268 浏览

jquery - 使用 jQuery 动画 CSS

所以我有看起来像这样的css:

这很好用,但是我想在悬停时使用 jquery easing 插件的效果

我知道有一个显示/隐藏 jquery 功能,但它对下拉菜单的反应不如使用 css 的效果好(下拉菜单在用户与其交互时并不总是保持显示),这似乎每次都有效。

所以我真的只是想为显示添加一个效果:无;然后显示:悬停时的块。如果这很容易,请原谅我,我的 jquery 技能不是很好,我在任何地方都找不到答案

小提琴

小提琴

0 投票
1 回答
1386 浏览

javascript - 将鼠标滚轮上的缓动与箭头集成

我使用这个脚本来“修复” IE 和 Chrome 在使用鼠标滚轮时没有连续平滑滚动的问题:

( JSFIDDLE )

我想要的是将箭头键也集成在其中。如何重写此脚本添加箭头键“滚动”的 eventListener 并应用缓动?

0 投票
1 回答
161 浏览

javascript - 将一个 jQuery Easing 插件动画分成两个(左 + 右)?

我有这段代码,其中使用jQuery Easing 插件在推荐之间切换。

这段代码可以在这里看到(去推荐部分):http: //jsfiddle.net/ahmadka/3hkwz/

当您打开推荐部分时,您会在底部看到 2 个按钮,用于在推荐之间切换左(称为prev)和右(称为next)。

该代码有效,但它使用相同的scrollLeft缓动动画来左右移动。我想更新代码,以便在prev单击时使用的动画应该是scrollRight,而不是scrollLeft..

相同的 JavaScript 用于将prevnext的点击链接到相同的缓动动画代码:

我该如何拆分它们?

此外,还有一个附加的 JavaScript 资源文件,其中包含一些相关代码:

消除这个: http: //www.jenierteas.com/templates/default/js/jquery.cycle.all.2.74.pack.js

然后转到第 118 行,您将看到以下代码段:

那么有人可以在这里帮助我吗?我很困惑..

0 投票
0 回答
125 浏览

jquery - 自定义缓动方程

我有这段代码:

如您所见,我使用easeInSine缓动函数将速度从 0 设置为 500。这有效,但并没有给我我想要的东西。我想要的是以恒定速度运行这个动画10秒,然后逐渐减速直到停止5秒,但我不知道如何编写缓动函数。

我知道您可以通过以下方式编写自己的缓动函数:

我需要的部分是做类似的事情

如果有人能帮我解决这个问题,我将非常感激。

更新

多亏了火花,我现在设法得到了这个:

但我还有一个问题。这运行了 15 秒,但在最初的几秒内,它又快又好(我会说 3 秒),然后在剩下的时间里它会慢慢停止。我需要它快速运行 10 秒,然后在最后 5 秒内减速。

有谁知道我可以如何修改示例以使其更好?

干杯

0 投票
3 回答
8602 浏览

jquery - jQuery Smooth Horizontal Scroll

I've created a long horizontal page and using anchors to navigate to section's within the page. I added a jQuery smooth scrolling function but it's not taking affect?

Here's the navigation:

Within the content i've added corresponding anchors:

And here's the jQuery function:

The anchor's work fine, clicking the navigation takes you to the desired section but it jumps instead of scrolling.

Any ideas why??

0 投票
2 回答
17048 浏览

jquery - 带有slideUp缓动功能的jQuery缓动

我刚刚从 StackExchange 阅读了这个问题和答案,但该解决方案对我不起作用。

这不起作用:

但这确实有效:

我正在使用最新的 jQuery-1.10.2.js。

有什么想法吗?

//

我添加了这样的缓动插件,它在 jsfiddle 中工作:

脚本代码是这样的:

我仍然收到此错误:

提前致谢!

//

我将其更改为单个 div,这是我的 html,这是错误页面

**此外,我使用的是本地主机服务器而不是实际在线,即使我的本地服务器上有源文件,这会影响插件吗?