Not able to change the format of date in the datepicker
I am using the below datepicker but I am not able to change the format of the date. $(document).ready(function() { $(document).on('click', '#mdateupto', function () { $("#mdateupto").datepicker( "option", "dateFormat","yyyy-mm-dd"); $(this).datepicker().datepicker( "show" ); }); }); Please help Regards Deepak Bhatia
Javascript to generate a 5-digit fixed length random number ???
Hi, I'm using K2 Smartforms, where you can embed Jquery/javascript in data labels using expressions. Can anyone help me create some jquery/javascript which can generate a RANDOM number which is of a fixed length of 5 i.e between 10000 and 99999 Thanks, I tried this code which I found to work ok with the data label, but this generates random number continually, is there any way to modify it to work as I want? < span id="number"></span> < script language="javascript"> function generate() { $('#number').text(Math.floor(Math.random()
Showing next div on click event
Hi Guys, Where can I find some simple script which would slide my divs up and down by clicking on up and down arrows on my screen. So if the user clicks on the up arrow will slide the section up, if they click down arrow it shows the next entry. Like a vertical carousel, but instead of the images I have elements, which need to be animated. http://wsi-digitalmarketing.co.uk/ - left handside Cotswolds Finest News. Any direction would be helpful. Thank you
Tooltips on dialogs
Hi, I am in the process of upgrading my website to use jQuery UI 1.12.1 instead of 1.11.4. However, I have run into a snag and would like some help. The issue is that when I have a tooltip that is displayed on top of a dialog, the width of the tooltip is constrained by the width of the dialog. Prior to 1.12.1, the tooltip could be as long as the window the dialog was on top of. I have an example below to illustrate the issue: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
looking for some help with the accordion with JSON data
I'm running into an issue with showing all of the associated data in my accordion, meaning that, not everything is appearing in the expanded view for the header of the accordion what happening is that, the data is showing as: BMW: 325i Mercedes C280 Chevy Silverado 2500 and I should be seeing the data as BMW: 325i 525 M3 M5 Mercedes C280 s550 AMG c43 Chevy Silverado 2500 Silverado 3500 Silverado 1500 Camero how can I get all of the models to
Help with summing cells in grid using Selectable
I am trying to implement a function like the Excel function of summing cells in a grid by dragging a fence around the cells. The code below only outputs the last cell selected: $(function() { $('#Grid1').selectable({ selected: function(event,ui) { var res = 0; $(ui.selected, this).each(function() { var nocomma = ui.selected.innerHTML.replace(/,/g, ''); res += parseFloat(nocomma); changeElementValue('sum',res); }); } }); });
why jquery $.ajax success not working in safari mac?
why jquery $.ajax success not working in safari mac? this is my code, $(window).load(function () { $.get("GetFirstTimeWizardStep", function(step) { if (parseInt(step) === 2) { $.get("/api/DisplayView?viewId=afe8cdd4f", function (flagView) { if (flagView === "False") { $("#afe8cdd4-e7a0-4577-9e53-322d5a3d8bbf").modal("show"); $.ajax({
JQuery click event re-firing is not working in IE
Running IE 11.0.9600.18524. I have a function which stops the default click event, performs some actions, and then after those actions are finished, triggers the event again to proceed with the form submission: $('#submit').on('click', function(event){ if (valid === true) { valid = false; return; } event.preventDefault(); valid = true; //do some stuff $(this).trigger('click'); }); This works nicely in Chrome, all of the form actions complete and then the button
code not working neither getting any error
I am not getting any error neither the code is working, whats wrong in my code? <!DOCTYPE html> <html> <head> <title>Radio button and List Check</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" > $("#country").change(function() { var country = $(this).val() var currency = { USD: "USD", EUR: "EUR", GBP: "GBP" }[country] console.log(country, currency) if (currency) $("[name=optradio][value='" + currency + "']").prop("checked",
Make a radio button selected when an item select from the list
I have the following code. I have the country field in the list and the currency field in the radio button. what I want is, when I will select a country, it will automatically select the currency from the radio button. I have 3 currencies US, EUR & GBP, for EU it will be EUR, for UK it will be GBP & for the rest it will be US. how can I do this using jquery. please help me.... <!DOCTYPE html> <html> <head> <title>Radio button and List Check</title></head> <body> <form class="form-horizontal" action=""
jQuery licensen
I have some questions regarding jQuery and what rules one must follow when using jQuery. I would much appreciate if my questions were answer as I have difficulty finding the answers online. Firstly, if I want to use jQuery in a commercial project what rules must I be considerate of? Secondly, if a part of my code is based on examples from jQuery, what are the rules then? Lastly, if I want to write a plugin for jQuery, what licensens must I abide by and why?
Reel.js Plugin not working in chrome browser
Hi, Im using Reel.js for my projet, first it will workis correct, but when adding follwing controls its not working in chrome browsers. $(document).ready(function(){ //init next et prev var prev=0; var next=0; $('#controls') .append($('<a/>').click(function(){ $('#imgRotate').trigger('stepRight') })) .append($('<a/>').click(function(){ $('#imgRotate').trigger('stepLeft') })); }); Please Correct the code for working in also the Chrome browsers. Old Code is : function loadImgs() {
Draggable, droppable, sortable
hey here is my code http://jsfiddle.net/hellyeah/0s2s1uvf/ You can drag and drop button onto another button and div will be created. And you can transfer one button too another div. But i have a problem about positioning. How can i fix the issue. Any help would be appreciated. Thanks for that.
Changing the val name without refreshing the page.
Page contain input bar for which user can type in certain numbers and submit. Without refreshing the page I would like to change the "var Name" below according to the user input instead of the current datetime. Thank you very much!
Correct way to handle .then continuation
I have a .then continuation that should either call another asynchronous function or not do anything. What is the correct way to write the function? Here it is: function loadCategories(shortDescription, categoryId, index) { return categoryService.loadChildCategories(shortDescription, categoryId, index) .then(function (result) { return categoryService.prefetchChildren(shortDescription, result, index + 1); }); } I want to call prefetchChildren
find classname fails
I've spent quite a bit of time debugging this. Anyone notice a problem? It cannot find the class toggledata. Looks like it should. <div id='div_76' class='tasks topdog' style='border:solid; border-color:red;white-space:nowrap;background:#cfecf0'> <div class='tasks toggleplusminus' style='background:#cfecf0'> <span style='font-size:12px'>[+]</span> <input id='cccproj_76' data-projid='76' data-selected='1' data-pri='50' data-cat='WORK' data-owner='frank' title='WORK' value='Test "This"' style='border:none;background:#cfecf0;color:black'
Split jQuery in multiple files
Hi, I'm pretty new to jQuery and hope you can help me with my problem. I need jQuery in smaller packets to transfer it. I wondered if it is possible to split the jQuery library file into several parts. For example, if I download a jQuery file with a size of 200KB: Could it be splitted into 10 times 20 KB files? Is there a common way to do this? Thanks for your help.
Menu Accordion - Expand panel of the link
Hi everyone ! I'm new on that forum and I hope you could help me ! I created a navigation menu for an e-commerce website. My accordion is working weel ! I would like that when we click on an item from the third section, for exemple, when my page reload to that link, the third section panel is "open". I can't do that with the active : 2, because it has to depend the url, is that clear ? Please see my html construction : <div id="accordion" style="background-color:#fff; padding:10px 0;"> <h3 class="menuitem">Animaux
Jquery-Calx will not persist on IF function
I don't know if this is the right place to ask this question. I am using the plugin Jquery-Calx. One of the formula i am using is IF function: data formula="IF(AND(H13='dance',H14='dance'),1,IF(AND(H13='dance',H14='cook'),2,IF(AND(H13='cook',H14='dance'),3,IF(AND(H13='cook',H14='cook'),4,0))))" the calculated result does write into the database, but won't persist on form view. But other type of calculation doesn't have this problem, why is that? does that mean i have to write jquery code to persist
Autocomplete Use
Wondering if Autocomplete-Custom can somehow be used more than once on a single web page without retrieving pre-populated var projects from each other. Reason: I am looking to use Autocomplete as a text replacement in different paragraphs in web pages. I am finding the last instant of Autocomplete is populating the first. If multi-use is possible, how wold one "open and close" the each instance of Autocomplete?.
How does Jquery work?
As part of Javascript, non-Ajax jquery code doesn't write into database (like persist), then how does all the function gets stored? in the browser? I am asking this because I am having problem with the form on my website. I am using the same source form html code for both the page that user can view the form and the page that user can edit the form (I used edit model to edit the form), thus the html and jquery code for the form of both view and edit are the same. However, jquery code for persisting
Can't Stop Cacheing
I'm playing around with mobile sites at the moment and have a very basic two-page multipage front sheet. The second page contains a div datesandtimes_main and I inserted a script that did a pagebeforeshow to use $('#datesandtimes_main').load('datesandtimes.html'); It works fine Only it's cacheing so if I change datesandtimes.html it will not show in the web app if I go back to page 1 and the back to page 2 again. Or if I hit refresh. In fact, the only time it *will* update is when I change the manifest
tree plugin with breadcrumb trail
I wish to build a UI where the user can navigate a tree such that: (i) The children (aka leaves) of the currently-navigated-to node in the tree are all displayed in a single <ol> (or similar) list (ii) Clicking on one of the entries in the aforementioned <ol> will navigate the user down a level and display the new list of children where the old list was (iii) Navigation upwards, and information about where the user is in the tree, are provided by a "breadcrumb trail". Does anyone know if a jQuery
How to drag multiple cells of a table , into multiple items of another table , where each cell of a table is connected respectively with each cell of the other table?
I want to select multiple cells of a table A and drag them into the respective cells of the table B. When I drop them I want that the cells of table B to change class into " dropped". So each cell I dragged is connected with the cell of table B ,where it is dropped.
Remove hover/active state from a list view item.
Hi using JQM 1,4,5 how can I remove the hover and active state from a list view item in the navbar. The code I am using is this: <div data-role="footer" data-position="fixed" data-tap-toggle="false" data-id="footer_1a" data-theme="a"> <div data-role="navbar"> <ul class="footerOptions"> <li><a href="#" data-icon="custom">© London Games, 2016</a></li> </ul> </div> </div> Thanks.
Weird character displaying above selector on selectmenu widget
Hi, I went to demos.jquerymobile.com and picked the selectmenu widget / custom select menu / data-placeholder. When displaying it on chrome browser on my desktop it looks good, but when displaying it on my phone using PhoneGap for iphone there are 4 characters that are appearing above the selec menu (AAAA is displaying) Has anybody had this issue before? How to solve? Thanks!
Having Issue On Selectiong a Dom Target with jQuery Traversing
I am trying to update the content of .help-block dynamically with using jQuery but not sure why I am not able to target the .help-block I know that we can simply use $('.help-block').text(....but as I said I need to do this through jQuery Traversing mechanism like using following find() or next() and first() but none of them did the job! $(function(){ $(".dropdown-menu li a").click(function(){ $("#selector").find('.help-block').html($(this).text()); $("#selector").next('.help-block').html($(this).text());
Recovering data from a joined string
I have a "canvas" div full of HTML, where 'canvas' here has nothing to do with an html 'canvas'. I want pack up everything relevant to div#canvas and store it as a single file, and then later read the file back and restore div#canvas as it was. I pack up the canvas styles with canvas$ = $('#canvas'); // the local canvas being saved var canvas_margin_top = canvas$.css('margin-top'); var canvas_margin_bottom = canvas$.css('margin-bottom'); var canvas_margin_left = canvas$.width()/2 +
Google Maps API
Hi, I am trying to get a google map to display. I have 3 files. HTML, JS and CSS. The map will not load. Can anyone point out where I went wrong with my code? Thank you Html: <!DOCTYPE html> <html><head> <meta charset="utf-8" /> <link type="text/css" href="map.css" rel="stylesheet" /> <script src="https://maps.googleapis.com/maps/api/js?callback=myMap"></script> <script type="text/javascript" src="map.js"</script> <title>My First Map</title> </head> <body> <h2 align="center">My First Google Map</h2>
Form submits when input is null
I want to prevent form submission when there is no input in the text boxes but the form submits even when the input is empty. How do I fix this? var input = $("#zip").val(); var input1 = $("#phone").val(); if ( $.trim(input).length == 0 || $.trim(input1).length == 0 ){ event.preventDefault(); } <input type="text" size="30" id="zip" name="zip"><br /> <input type="text" size="30" id="phone" name="phone">
toggle slide: from hide to show and not from show to hide how to?
Hello all. I've take a look to the example at this url about toggle slide effect: http://jqueryui.com/toggle/ the example, when page has been loaded, show the div and so you click button to hide the div. I would like instead, that when the page has been loaded, the div is hide, and when i click, the div shown. So i've try many stupid things, but nothing work. Thank you.
Attempting theming... what files do I need?
From looking at the source code for the demo http://demos.jquerymobile.com/1.2.1/docs/content/content-themes.html it looks like I need the contents of these 3: <link rel="stylesheet" href="../../css/themes/default/jquery.mobile-1.2.1.css" /> <script src="//code.jquery.com/jquery-1.7.1.min.js"></script> <script src="../../js/jquery.mobile-1.2.1.js"></script> However, my page is being shown minus those plus and minus signs that belong on the collapsible content. Where would these plus and minus signs
lettering.js
Hi, I am having a problem with my css code for lettering.js. I want to have two words styled differently, but cannot figure out how to differentiate the .char#'s. Here is my code. Thank you for any help. <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Working With lettering.js</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="jquery.lettering-0.6.min.js"></script> <script src="//use.edgefonts.net/source-sans-pro.js"></script>
want to click an application link
Hi All, we have a requirement where i need to click some link of one application .can we do this any batch file or script through which we trigger that application will click the link . Any idea on this? Thanks, Rohit
Multiple selectbox using jQuery
I am developing a python/django app and I have this form where I have two multiple select boxes. And I want to select an option from the left and move it to the right. I have two only to be more firendly tothe user. The selected options that are being saved are to the left select box. You will see to the following code how, I think it's very simple. I am using .each, because I somehow loop...but my code, I think, at each click repeats itself and keeps only the last one I have selected. I came to
Help-me problem array
my array is returned php this form: Array
(
[0] => Array
(
[Sua senha deve ser maior que 4 caracteres e menor que 20] => 1
)
[1] => Array
(
[O email lucasabner07@hotmail.com já está cadastrado no sistema. Se você for ... clique aqui. Se não tente um outro email] => 1
)
) My objective is Manipulate this array to use the key as message and value as the message type, if it is 1 an action if another action. And main array I want to use
How to Restore form using Cookie
I am using js cookie plugin to generate json cookie. Cookies.set('myTestCookie', { cookieData },{ expires: 30 });I am also able to restive it. var $recivedCookieData= Cookies.get('myTestCookie'); alert($recivedCookieData); I am also getting alert as {"cookieData":{"country":"uk","state":"england","city":"london","location":"Baker Street", "zip":"W1U"}}if I have to fill up the form using the cookie data how should I do it? my form uses post method. Thank You.
jQuery ajax API call with JSONP data type is failing
down votefavorite I am building client application( using Jquery and HTML but no server side language) to access API call publish by NPPES website- https://npiregistry.cms.hhs.gov/registry/API-Examples I am using JSONP data types to avoid same origin policy in browser call but Ajax call is giving error and don't go to success callback. e.g I am trying to call this : https://npiregistry.cms.hhs.gov/api?number=1073500443 ( if i directly invoke this in browser it gives json data back $(document).ready(function(){
Uncaught TypeError: $(...).datepicker is not a function
hi here is my code. I want to choose a date and the other will automatically give me 2months later date. its shows me this error "Uncaught TypeError: $(...).datepicker is not a function" <!DOCTYPE html> <html> <head> <title>Date Choose Option</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> </head> <body> <input type="text" class="firstcal"> <input type="text" class="secondcal"> <script> $(function() { $(".firstcal").datepicker({
Uncaught ReferenceError: $ is not defined
hi I tried to execute this code but its not working.... here is the code. <!DOCTYPE html> <html> <head> <title>Testing Dropbox</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> </head> <body> <div> <textarea class="carPark"></textarea> </div> <div> <select class="carDealer"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option>
Next Page