jquery

Video Current time giving undefined

大城市里の小女人 提交于 2021-02-11 08:25:46
问题 Hello I have dynamic videos which I tried to get the current video time but I seem to be getting undefined which i don't know why. I fire a function using on time update javascript event, however when i alert this var ok=$(e).attr('id'); i get the videos id but i dont know why when i try to get video current time i get undefined as value, these is my code dont know where i am getting it wrong. <script type='text/javascript'> function men(e){ var ok = $(e).attr('id'); var ol = $(e).attr('id');

Video Current time giving undefined

好久不见. 提交于 2021-02-11 08:21:07
问题 Hello I have dynamic videos which I tried to get the current video time but I seem to be getting undefined which i don't know why. I fire a function using on time update javascript event, however when i alert this var ok=$(e).attr('id'); i get the videos id but i dont know why when i try to get video current time i get undefined as value, these is my code dont know where i am getting it wrong. <script type='text/javascript'> function men(e){ var ok = $(e).attr('id'); var ol = $(e).attr('id');

Video Current time giving undefined

本小妞迷上赌 提交于 2021-02-11 08:21:05
问题 Hello I have dynamic videos which I tried to get the current video time but I seem to be getting undefined which i don't know why. I fire a function using on time update javascript event, however when i alert this var ok=$(e).attr('id'); i get the videos id but i dont know why when i try to get video current time i get undefined as value, these is my code dont know where i am getting it wrong. <script type='text/javascript'> function men(e){ var ok = $(e).attr('id'); var ol = $(e).attr('id');

Set div to hidden, then visible after time delay

守給你的承諾、 提交于 2021-02-11 08:16:06
问题 I'm trying to have a yellow square appear on a black background after X amount of time (perhaps even after a random amount of time, but for now let's just do fixed time). function initialSetup() { if (document.getElementById("yellow") != null) { document.getElementById('yellow').style.visibility = 'hidden'; setTimeout("document.getElementById('yellow').style.visibility = 'visible'", 2000); } .box { width: 50px; height: 50px; } .yellow { background: yellow; position: absolute; top: 50%; left:

Ajax post to a php file in a directory not working

坚强是说给别人听的谎言 提交于 2021-02-11 08:06:14
问题 I'm using Ajax request for a project and i has lot of problem to make it working I sommetime receive some error 500 (Internal Server Error), but finally everything works until I wanted to move my scripts into a directory. Here is my Ajax works : var xhr = getXMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) { callback_like(xhr.responseText, receive); location.reload(); } }; xhr.open("POST", "like.php", true); xhr

Ajax post to a php file in a directory not working

别说谁变了你拦得住时间么 提交于 2021-02-11 08:05:59
问题 I'm using Ajax request for a project and i has lot of problem to make it working I sommetime receive some error 500 (Internal Server Error), but finally everything works until I wanted to move my scripts into a directory. Here is my Ajax works : var xhr = getXMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) { callback_like(xhr.responseText, receive); location.reload(); } }; xhr.open("POST", "like.php", true); xhr

Disable few date ranges in Bootstrap-datepicker

点点圈 提交于 2021-02-11 07:44:25
问题 I'm trying to disable few date range arrays using BeforeShowDay fucntion in Bootstrap-Datepicker. I have such code: var dateArray2 = getDates(new Date("2016-12-20 14:57:28"), (new Date("2016-12-22 14:57:28")).addDays(0)); var dateArray3 = getDates(new Date("2016-12-22 14:57:28"), (new Date("2016-12-25 14:57:28")).addDays(0)); var dateArr = new Array(); dateArr.push(dateArray2); dateArr.push(dateArray3); //Datepicker init $('.date').datepicker({ format: 'dd-mm-yyyy', startDate: date, autoclose

Adding autofocus attribute when input is hovered

北城余情 提交于 2021-02-11 07:37:16
问题 I'm trying to add autofocus to an input form when it's hovered. Using the .appentTo attribute but open to other solutions. Here's what I have: <input value=""/> $(document).ready(function(){ $("input").hover(function(){ $("autofocus").appendTo("input"); }); }); Fiddle: https://jsfiddle.net/t7yj3b4n/1/ 回答1: To focus an element use focus() method. Here you try to add the attribute autofocus with a bad method (take a look at Zakaria's answer) to all input. Use $(this) for target the hovered

Adding autofocus attribute when input is hovered

拜拜、爱过 提交于 2021-02-11 07:36:36
问题 I'm trying to add autofocus to an input form when it's hovered. Using the .appentTo attribute but open to other solutions. Here's what I have: <input value=""/> $(document).ready(function(){ $("input").hover(function(){ $("autofocus").appendTo("input"); }); }); Fiddle: https://jsfiddle.net/t7yj3b4n/1/ 回答1: To focus an element use focus() method. Here you try to add the attribute autofocus with a bad method (take a look at Zakaria's answer) to all input. Use $(this) for target the hovered

Using Jquery Ajax on JSP to display on Datatables

▼魔方 西西 提交于 2021-02-11 07:29:13
问题 This is my first time using Jquery Ajax. The context is that, i'm trying to display more than 10000 rows of data on Datatable, what i did previously was just to use my servlet to forward my Arraylist of data to the JSP, then loop through and display the data onto display data. It was taking too much to load the datatables. So i decided that i want to try to use Jquery Ajax to see if that will help the issue. I'm currently facing some issues implementing it, can anyone help me? I'm using GSON