Giter Club home page Giter Club logo

jquery-timer's People

Contributors

iurisilvio avatar jchavannes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-timer's Issues

Time lag

I used timer but there is one major issue, the timer control shows time lag when compared to the actual clock. The timer ticks are slow as compared to actual clock ticks which results in time lag and that can be in minutes.
Is there any way to fix this.

How to break from the timer loop?

for example:
I want to break out from timer loop when the result is success from an Ajax call, see below code:

<div id="tip_text">请等待。。。。</div>
<script type=text/javascript>

alert('<%=@comp_job_id%>');
var complete_done = "";
var timer = $.timer(function() {
$.ajax({
  url: "/reports/check_report_status",
  data: {  comp_job_id: '<%=@comp_job_id%>'  }
})
  .done(function( ret_json ) {
    ret_json_struct = $.parseJSON(ret_json);
    alert(ret_json_struct.msg);
    complete_done = ret_json_struct.status;

    $("#tip_text").html(ret_json_struct.msg+"<a href=\"/reports/download_report?rep_name="+ret_json_struct.file_name+"\">download file here</a>");
    alert(complete_done);
    $(this).stop();

    alert(complete_done);
  });
  //$.ajax({
  //url: "reports/check_report_status",
 // data: {}
//});
});
timer.set({ time : 5000, autostart : true });

</script>

license

Can you please provide/include the license under which this software can be used? Is it under MIT license? If so can you please explicitly state that and include the license in the zip file?

Thank you,

AJ

$ npm install @types/jquery.timer --save-dev

ERROR in /Users/zhangyu27/Documents/git.oschina.net/DuoBaoWeb/src/app/app.component.ts (19,24): Property 'timer' does not exist on type 'JQueryStatic'.

ERROR in /Users/zhangyu27/Documents/git.oschina.net/DuoBaoWeb/src/app/app.component.ts (21,11): Cannot find name 'JQueryTimer'.

Why?

Code mismatch between download/demo

The code available here: http://jchavannes.com/include/scripts/3p/jquery.timer.js

Is different than the code available here: http://jchavannes.com/download/jquery-timer-demo.zip

I had been using them interchangeably until I found a bug that only showed up when I used the hosted version of the code. The bug doesn't show up on the downloaded version.

In brief, the bug was that I couldn't get a timer to restart itself by calling .play() after calling .stop() - in a very convoluted scenario. Using the downloaded version solved the problem.

How can the jQuery Timer run in background

I 'm using your jQuery Timer .
When open another tag in my browser, the jQuery Timer turn to pause.
Return to the tag which jQuery Timer was running ,the jQuery Timer turn to resume.
How can the jQuery Timer run in background, when i work in other tag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.