jquery

Adding functional capabilities to my jquery plugin

余生长醉 提交于 2021-02-08 11:06:18
问题 I'm writing a jquery plugin. The purpose of the plugin is to scan a table with 1 row of inputs and create the capability to add new rows of similar inputs. Then, when any of those inputs are changed, the plugin will scan all the inputs in the table and generate a JSON string and put that string into a hidden input. I create the plugin with a line of code like this: jQuery("#reports").multiSubmit({ table : "reports", input : "reportSelections" }); Now, I need to add the capability to add a new

jQuery spinner arrows not visible

雨燕双飞 提交于 2021-02-08 11:05:38
问题 I have seen a previous post on this Jquery Spinner arrows not loading (visibility) but I still can't seem to load or see the spinner button images, although the spinner works fine. The css file path is: wwwroot/lib/jquery.ui.combined/Content/themes/base/jquery-ui.css and the images are in: wwwroot/lib/jquery.ui.combined/Content/themes/base/images. I have had no problem in the past using jquery ui and spinners. I again used NuGet (with VS cummunity edition 2015) to get the jquery ui package,

jquery pause on hover

拟墨画扇 提交于 2021-02-08 11:04:07
问题 So I am using the following script to create a slideshow for sliding content. I am wondering what is the simplest code to add 'pause on hover' functionality to this. So that when a user focuses his mouse pointer on the whole sliding div it will pause the slideshow and - once removed resume again?... $(document).ready(function() { var currentPosition = 0; var slideWidth = 500; var slides = $('.slide'); var numberOfSlides = slides.length; var slideShowInterval; var speed = 3000; //Assign a

$(window).scroll not fast enough to process my jquery?

拥有回忆 提交于 2021-02-08 10:55:54
问题 Im having an issue with window scrolling where I think events are firing too quickly to process. Im using waypoints to detect when a subnav on my page hits the header when scrolling, and when it does it pushes the header up off the page. And when scrolling back up, the header gets pulled down into its original position. Now the first part works flawlessly, the head gets pushed up, but pulling it back down is very buggy. Scrolling too quickly results in the header getting stuck on the way. It

Hide scroll bar when page preloader loads

白昼怎懂夜的黑 提交于 2021-02-08 10:53:34
问题 I want to hide scroll bar while preloader is loading the scroll bar will not show until unless preloader disappears which means the user can't able to scroll the page while preloader is loading here I'm using canvas as a preloader. I tried by using body overflow: hidden and some CSS also but unable to achieve the result here I used canvas effect as a preloader. Can anyone point me in the right direction what I'm doing wrong? /* Preloader Effect */ var noise = function(){ //const noise = () =>

jQuery toggle based submenu toggles all submenus

别等时光非礼了梦想. 提交于 2021-02-08 10:48:32
问题 I'm new to jQuery/JS. The following is my attempt on a jQuery based menu with submenus. I'm not sure what to do here to fix this or where to go from here. $(document).ready(function() { $(".toggle-btn").click(function() { $(this).toggleClass("active"); $(".parent-nav").toggleClass("in"); }); $("#mainnav .child-nav > a").click(function() { $(this).toggleClass("active"); $(".submenu").toggleClass("in"); return false; }); }); body { padding: 20px 50px; } .sr-only { position: absolute; width: 1px

Hide scroll bar when page preloader loads

佐手、 提交于 2021-02-08 10:47:18
问题 I want to hide scroll bar while preloader is loading the scroll bar will not show until unless preloader disappears which means the user can't able to scroll the page while preloader is loading here I'm using canvas as a preloader. I tried by using body overflow: hidden and some CSS also but unable to achieve the result here I used canvas effect as a preloader. Can anyone point me in the right direction what I'm doing wrong? /* Preloader Effect */ var noise = function(){ //const noise = () =>

Using regex to restrict input in textbox [duplicate]

房东的猫 提交于 2021-02-08 10:44:20
问题 This question already has answers here : HTML input that takes only numbers and the + symbol (7 answers) Closed 3 years ago . /^+{0,1}(?:\d\s?){11,13}$/ this regex allows + at first place only and numbers only... on keypress I want user should only be able to type + at first and digits that what above regex validates But code always goes to if part..why regex not working in this scenario function ValidatePhone(phone) { var expr = /^\+?(?:\d\s?){11,13}$/; return expr.test(phone); } var

Using regex to restrict input in textbox [duplicate]

你。 提交于 2021-02-08 10:43:01
问题 This question already has answers here : HTML input that takes only numbers and the + symbol (7 answers) Closed 3 years ago . /^+{0,1}(?:\d\s?){11,13}$/ this regex allows + at first place only and numbers only... on keypress I want user should only be able to type + at first and digits that what above regex validates But code always goes to if part..why regex not working in this scenario function ValidatePhone(phone) { var expr = /^\+?(?:\d\s?){11,13}$/; return expr.test(phone); } var

Scroll to same Position on reload and load

China☆狼群 提交于 2021-02-08 10:39:18
问题 i have a webpage that is full of div's with huge length, so whenever I refresh my page or manual document loading through actions, i need to scroll my window or document to same or previous position, but i want that to be done by browser automatically. i searched it in web and found no help, but i came to know that solution is there with out any other lib inclusion. I have a page of height more exceeds window height with some divs and select boxes whenever i select any thing in middle of page