Why dynamic insertion of buttons correct, but .data() not being passed
For reference: jquery-2.1.1.min.js jquery.mobile-1.4.5.min.js Problem exists in bigger project, I pulled code into a test page and tried to fix. I failed. I hope someone can direct me forward. Problem: I dynamically insert buttons into my page. Afterwards, I want to apply .data() values to each of the buttons - The buttons exist in the "generated source code" but any reference to the data key/value are missing. Interestingly, my js can reference the key/value pair as if it exist in the page though
Referencing HTML forms generated on the fly using JQuery html
Hi, I am generating an HTML form with radio buttons on-the-fly and when I try to catch a click event on one of those radio buttons, I am not successful. I am working on a web page that leads a user to the environment he wants to be in by asking a series of questions where the answers are specified by selecting a serions of radio buttons. For example, suppose there are 3 attributes that specify what environment the user wants to be in. Lets call them attributes A, B and C. The following table shows
How to change this?
How to change the following decimals value using jquery? 1234.56 ====>>> 1,234.56 12345.56 ====>>> 12,345.56 1234567.56 ====>>> 1,234,567.56 12345678.56 ====>>> 12,345,678.56 1234567890.56 ====>>> 1,234,567,890.56 Is it possible using jquery? Please give regex or code to get my output?
Jquery 2.1.2 or higher does not work with strict mode.
We are using strict mode on our site and when I try upgrading jquery to version 2.1.2 or 2.1.3, jquery throws the below console error: Uncaught SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function. Is there any way around this without disabling strict mode, or will I just need to wait to upgrade until it gets fixed?
Autocomplete keypress skip menu
Hi All, I am using jquery-ui 1.11.2 for autocomplete with the following custom menu rendering: function integrationSearchRenderMenu(ul, items) { var self = this, emptyItem = { label: '', value: '' }; ul.append($('<div></div>').data('ui-autocomplete-item', emptyItem).append( '<div class="image"></div>' + '<div class="name">Product</div>' + '<div class="dek">Description</div>').addClass('ui-widget-header')); ul.addClass('integration-search');
Pagination in jQuery
I am new to jquery. Now i want to implement pagination like the following link pagination using jquery example . But i want to fetch data from database and display in a table. This task has to be implemented using asp.net and jquery. Thank you!
jqgrid reload is not updating the data
Hi all, I'm very new to Jquery. I have one jqgrid which contains one hidden id . When i try to add a new row i observed that id is populating like jqq1. Once i do refresh the page then the id is populating properly . I need to refresh the grid with updated data . I'm struggling with this issue from past 1 week , tried a lot of options but none of them solve my issue . Here is my code : mygrid.jqGrid('navButtonAdd','#pager', { caption: "", buttonicon: "ui-icon-plus",
change color of alert text
Hello How can I change color of text in alert with jquery? thanks alot
TableSorter and TableSorterPager: How to reload tablesorter table after using drop down values to run new query
I have figured out how to get the page to do what they were looking for using append. Thanks anyway... I have taken over someones code, and most of this is very new to me.Below are the files I am working with. What is supposed to happen is that the page loads with an empty table. Then after a value, or values, are selected from the drop down, the tablesorter table should refresh based on the results from a query. Right now, the select works, the submit works, but the table does not refresh. Javascript
popbox.js issue with img hiding behinde my nav menu question
I really like the popbox.js http://www001.upp.so-net.ne.jp/www2014/ and I have it in my website here http://www.toolbin.com/template5.shtml My issue is that when you click the 1st tall image on that page it hides behind my nav menu. Is there a way I can edit your popbox.js file to make the pop image appear in front of my nav menu? Any ideas or suggestions and much appreciated and I thank you in advance http://www001.upp.so-net.ne.jp/www2014/
How to get value of dynamically added fields ?
Hi, Can you please tell me how to get the value of dynamically added fields, for example this jsfiddle : http://jsfiddle.net/mlotfi/43gyzepo/ Thanks
where does $(this) point to , under the following circumstances .
Given the following code INSIDE A PLUGIN , where exactly is $(this) pointing to ?? EXMPLE ONE : var current = $(this); // declared as a global variable inside a plugin. EXAMPLE TWO function number_of_image(){ $(current).each(function(){ count++; }); return count; }; EXAMPLE TWO : function number_of_image(){ $(this).each(function(){ count++; }); return count; }; EXAMPLE THREE : (This is not a function , this snippet of code is typed in the global scope of the plugin) : var count
Space between lists on listview. Is there I missed something ?
Hei guys Im not expert in programming. Need to ask, when I try to build listview (any kind of list view) in JQM, Im getting trouble with the space between each list. It should be no space between lists as shown in JQM web examples. Is there I missed ? waiting for your help and solution guys. Attachment = comparisson between example and my result Browser = Opera JQM version = 1.4.5 (loaded js and css as well) Thanks a lot :)
Changing the non-active state of the text on a radio button.
I have a set of radio buttons, the theme of the background is white and the text on the button is white. It is fine when the button is checked as you can see the text clearly visible but how can I change the text on a non-active state to black? Thanks.
whats wrong with this?
<!doctype html> <html> <head> <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" /> <style> .wrapper { } .slider { width: 728px; height: 310px; overflow: hidden; margin: 30px auto; } .slider img { width: 728px; height: 310px; display: none; } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script> <script> function
Drag N Drop Stops working for some reason in IE 9
I'm a newbie in Jquery. I'm using jquery ui drag n drop (draggable and droppable) jquery-ui-1.10.3.custom.min.js and jquery-1.10.2.min.js, it works , but for some reason it stops working after several seconds when i'm sending some data (using ajax) about columns' position into the server , i can't understand what is the problem and why it stops working (i.e. i can't drag columns with mouse cursor , it only selects text with cursor but doesn't drag the columns). Also i have an issue with helper: "clone"
Radio Buttons & Stretching 100% on screen.
I am trying to develop an app on the iPhone. However due to the different sizes of the screens one of the problems I have is with radio buttons. I have a set that needs to stretch across the screen but I am completely stumped by it. I have created a fiddle, http://jsfiddle.net/83LpjLe0/, Any help would be really appreciated. Thanks.
Possibility of using jQuery Tabs with older version of jQueryUi?
I'm using an online service where on the backend, they have jQuery loaded. It's a previous version that doesn't necessarily work with the current jQueryUI version. More specificially, I am using the Tabs and Accordion functionalities. Well, by overriding the version of jQuery and jQueryUI, I have now disabled the native functionality they've included with their software. I wanted to ask if anyone could help me. I want to keep the jQuery version they have stored in their program and only call
Android and IOS Keyboards not hiding
Im using jquery mobile 1.2.0.min and jquery 1.7.2 and i also just tried the jquery 1.8.2 version and still got the same problem. I have tested my app in Android 4.0.4 and IOS6 , Xoom tablet and iphone 4 specificially. On any page , whenever I finish typing something and press the return button , it does not close the keyboard. I have tried .blur() , .focus() on another element , $('input').blur() , a chain of .blur() .focus() .blur() and they all do not work. In fact , .focus() on an element does
Prototype.js->toJson causing problem
I am injecting some Java script in to a page. The order in which my scripts are being injected is as follows [immediately after <head>. Other scripts that existing page requires are after this]: http://code.jquery.com/jquery-2.1.3.js http://localhost:9140/Scripts/jquery.signalR-2.0.0.js http://localhost:9140/signalr/hubs var ah = jQuery.noConflict( true ); http://localhost:9140/Scripts/ChatScript.js The page is already using some other version of jQuery along with Prototype.js. I need help with
Jquery issue
Hello everyone. Sorry to bother you but Im not using this program or do not have anything installed like this but when I start my windows I get this error sometimes : https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js it asks me if it should load scripts or no . My question is what it is and how can I remove this error/bug or what it is/does to my new notebook. Thanks for answears.
Dialog modal form demo not working in Firefox?
Hi, I'm trying to understand how the Dialog modal form demo (http://jqueryui.com/dialog/#modal-form) works. I copied the source to a file on my local machine and I'm accessing it through a local apache server. When I use Google Chrome everything works fine, however when I try to access the page using firefox the dialog doesn't appear at all. I get the 'existing users' table but when I click on 'Create new user' nothing happens. The firebug console doesn't show any errors. If I look at the online
Splitting my function so it runs separately
I'm super new to jQuery and barely grasp the basics of it. I have the following code, which I am embarrassed to say probably took me over 10 hours to create! It sort of works, but it has a small problem. What it does, is makes some calculations for an employee schedule maker I am working on. I need the third part (starting on line 40) to happen separately from the rest. Because it uses a couple values obtained from the second part. My assumption here, is that the two values from lines 46 and 47 are
Dynamicly show/hide div which has value the same as button
In a loop I add dynamicly in php button and div which is hidden by css echo "<input type=\"submit\" value=\"$entry\" class=\"button\">"; echo "<p id=\"mydiv\" value=\"$entry\"></p>"; i want to show/hide only this div which has the same value as button.
jquery form: How to prevent submission.
I have a form in a tab. I use $('#myForm').ajaxForm(function() { alert("Thank you for your comment!"); }); and the message appears; however, the form is a file upload <form id="myForm" name="upload" class="loginform" action="../php/recordInteraction.php" method="post" accept-charset="utf-8" enctype="multipart/form-data" > <input type="hidden" name="rId" value="upload"> <div> <p> <input name="file[]" id="file1" type="file" accept="image/jpeg"
isotope - send datafilter with url
Hi all I have isotope installed and it works fine: When I call the web page (let's call it webpage.html), all images load, and when I click on a button with a link like *** href="#" data-filter=".art" *** I see only art images and all others are hiding - everything works fine as it should. Now, what I want is this: On my start page (let's call it index.html) I want to load this webpage.html but including the filter for "art". So that when loading, the webpage.html already filters so that it displays
Delayed closure of Modal window - common code
Hello, I have a common code for showing a number of modal windows at various times and on my entire website. All but one of them I would like the user to explicitly close. But one modal window, I would like to close after a delay of a few seconds say 10 seconds. This is the common code I use: ----------------------------------------------------------------------------------- var md_done = false; var md_height = 400; var md_width = 400; function md_show(caption, url, height, width) { md_height
forms plugin inside tab
I want to use jquery forms but my form is in a tab which is loaded dynamically by ajax. I am not sure where/when/how to enable the form. I think I need to put the enabling call {$('#myForm').ajaxForm} somewhere so it can be called after the tab containing the form is loaded, but I don't know how. Can someone help? Thanks. --Len My html code is below. I have an external file which contains the same form (different id) in the third tab. The second tabs submission is intercepted; the
' format no matches' works with json but not ajax data
Hi If my select2 is populated with json and no matches are found works with format no matches. However if I my data is populated by ajax I am not notified in any way that no matches are found. There is nothing I can hook into to take appropriate action <!DOCTYPE html> <html> <head> <link href="js/select2.css" rel="stylesheet"/> <meta charset="UTF-8"> <title>Select2 tests</title> </head> <body> <script src="js/jquery-1.11.1.min.js"></script> <script
select2 loses its formatting when you select multiple elements then delete one/some of then
Hi My select2 box allows you to select multiple options and then delete them if you change your mind. However it loses its formatting when you delete something. Mine is populated by ajax/php but here is one populated by json with the same problems <!DOCTYPE html> <html> <head> <link href="js/select2.css" rel="stylesheet"/> <meta charset="UTF-8"> <title>Select2 tests</title> </head> <body> <script src="js/jquery-1.11.1.min.js"></script> <script src="js/select2.js"></script>
how to abort an ajax request once the browser receive 200ok
i have an ajax request that looks like // ---------------------------------------- start(clicked_button, app_path) var start = function(clicked_button, app_path) { $.ajax({ type: 'POST', data: { 'app_path': app_path }, url: '/app/start', context: clicked_button, success: function(msg) {console.log('ok go to sleep ..'); } }) .done(function(data) { console.log(data); $(this).removeClass('btn-success');
How to detect high contrast mode.
Is there simple way to detect high contrast mode? I am talking about windows high contrast mode (web accessibility). I need to detect this mode in browser. Any idea? Thanks for help.
Issue on Deselecting All Checkbox on Un checking one of Child
I am trying to use jquery to check all checkboxes using below code which working fine on toggling select all on check and un check the slectAll Now I want to uncheck the slectAll in case of a situation if a user un-check one of the ieldset checkboxes. I tried this code $.each($("input[name='numbers']:not(:checked)"), function () { $('input:checkbox[name=slectAll]').prop("checked", false); }); Here is the code I have <label for="boxid">Select All</label> <fieldset id="group_1"> <input
tabs widget not working when located in a separate HTML page
Hello, My problem is a non-functional tabs widget whenever it is not initially added to the DOM, but only added after I select a link to a different HTML document. I did some searching and it sounds like this is a legitimate bug (https://github.com/jquery/jquery-mobile/issues/7169) but I am wondering what the best way to address this issue would be.
How can I get a Single Line Scroll Tab with Sortable Items.
Hello Everyone, I'm trying to create a Tab that can only be on one line and can be scroll left and right with Arrow on the left and right of the tabs. See image: And I also want to combine it with Sortable Items in each tabs and allowing them to move from one tab to the other Like this here: http://jsfiddle.net/tilwinjoy/6PL8H/ How do I go about doing this? Have anyone created any plugin that already does this? Thank you
jQuery countdown serverSync for multiple countdowns
Hi, I use jQuery CountDown on an auction website. There are multiple countdowns on the same page, and sometimes a countdown is updated (when a bid is made in the last 30 seconds of the countdown) via pusher. The problem is that the countdown is not really reliable. When I open several navigators, there are some differences between the countdowns. Sometimes 3 or 4 seconds. The options serverSync is used, but it seems that when the countdown is updated, the new value is not synchronized anymore ...
getting the var element to focus or blur
I am using the below javascript along with infopath. This code helps to get the substring of the URL and then depending on the text, it assigns value to the control. However, the way it is done here is using a var Now, once the var is assigned the value when we click on the save button, it is not saved. I want to issue a blur or focus for the control to which this var is referring to. Could you please help me ? <script type="text/javascript"> //_spBodyOnLoadFunctionNames.push("displayABC");
Bug on IE11 with select-Tag?
Hello out there, does anybody know about a jQuery mobile bug in IE11 according to the combobox / select-Tag? Small snippet to demonstrate: <select name="language" id="cboLanguage"> <option value="1">1 test</option> <option value="2">11 test</option> <option value="3">11test</option> <option value="4">something else</option> </select> Normally it is possible with select-Tab to focus, navigate with arrow keys or press letters and the correct/fullfilling option is automatically displayed. This works
My LED calculator won't work
I'm trying to make a LED Calculator with jQuery, but it won't work. Heres my index code: <!DOCTYPE html> <html> <head> <title>LED calculator</title> <link rel="stylesheet" type="text/css" href="style.css"> <script src="jquery-1.11.2.js"></script> <script type="text/javascript" src="script.js"></script> </head> <body> <h1>LED Calculator</h1> <input type="text" id="srcVol"> Source Voltage</input> <br> <input type="text" id="dioForVol"> Diode Forward Voltage</input> <br> <input type="text" id="dioForCur">
events are not firing on second hit in Firefox
hello all.. Problem: i have 'keypress' event on textbox for search functionality. as i enter any character into textbox for the first time, then it is working fine and showing matched records(every page event and js functions are firing well). But, as i enter one more character on same textbox, it stops working. none of the page events are firing. Note: this is working well in IE and chrome. problem with only firefox. please let me know your views on this. this may not be the correct place
Next Page