problem initiating jquery in color fade
Hello, I am new to jquery, having just read a bit and worked through 5 tutorials as part of Jeffrey Way's 30 Days to Learn jQuery over at tuts+. I have experience with actionScript and am now trying my hand at HTML5/CSS3 + jQuery. What I am specifically trying to do is to fade between the background colors of a div. I have an example using a simple array + a function that works great at jsfiddle: http://jsfiddle.net/johnkoer/8GGFM/26/ I am being humbled by asking this question for sure, but I cannot
Cannot get path correct on .load()
I'm trying to use the .load() method of jQuery. On my index page, I have the following: $(function () { $("#mainContent").load("views/pageone.html"); }); It loads fine and my url looks like this (http://localhost:50715/website1/index.html). Index.html is at my root and all other pages are under a folder structure. Now, after it is loaded, looking at the contents of my pageone.html, I also have a load method: $(function () { $("#mainContent").load("views/pagetwo.html");
[RESOLVED] problem using class selector
Hi, First a description of what I am trying to do. I hope I am clear enough to be understood, but I'm not sure it is necessary to understand my intent. It is provided as background mostly. I am writing a program that progressively goes through a tree of application states using radio buttons in forms. So, there is a root form with radio buttons and depending on the selection, the next form will be a form with radio buttons with the choices based on the context of the parent form. The idea is to move
Event in doc.onpropertychange
This is part of the JQM source, around line 1880: // Whenever `document.title` changes, update the Iframe's title to // prettify the back/next history menu entries. Since IE sometimes // errors with "Unspecified error" the very first time this is set // (yes, very useful) wrap this with a try/catch block. doc.onpropertychange = function(){ try { if ( event.propertyName === 'title' ) { iframe.document.title
Overlay Using Slider(s)
Hi, I'd like to create a set of sliders that appear as an overlay on top of my page (and dim out the background). I thought of trying to put them in a modal and make the modal transparent. But is there a better solution so that the sliders are an independent overlay? Thanks Jon
:( Which js has modified my html ?? :( :(
a javaScript code has added class="x" to my <div>...</div> and has turned it to <div class="x">...</div> how can i find that js :( ??? is there any browsers plugins that traces which js line has modified selected html tag ?
Problem with ajax and button event
Hi guys, sorry for this stupid question, but I can't solve this. When I click on the button , the ajax request sent as often as I have "each " elements . Plus once the regular . How can that be? The ajax request is started but only once at the end . And it should also be started only once. I just do not come on , and prophesied no longer what I could google . That is my jQuery code: $('#iptableschange-save').click(function() { id = $(this).attr('value'); chainid = $('#changeiptablerule #add-iptable-rule-chain
differencer between $('<a') and $('a')
what is difference between $('<a>') and $('a')
bug with #side-scroll
There seems to be an error with this snipit: https://jqueryui.com/slider/#side-scroll If you put N items in, it doesn't seem to automatically scale to the size required. How can I work around it so it adjusts as needed?
Attr checked after open jquery dialog does not work
I am using jquery 1.11.2, I am trying to check a checkbox after opening the dialog if the value in a textbox is '1', but it works only the first time. I tried with jquery v1.8.3 then it works, I don´t know if I making a mistake or maybe is a bug. I leave the source code here using the two versions.
JQuery UI slider and Bootstrap modal.js
Hi, I am trying to place a bunch of jqueryui siders in a modal dialog in bootstrap.js. The sliders do not appear in the proper place in the dialog and in some cases extend out beyond the dialog borders, etc. Does anyone know how to use JQueryUI slider inside of a modal.js dialog properly? My relevant code is the following: HTML: <div class="modal fade" id="tuning_modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button"
adding 2nd Drag and drop file to the variable\FileList
How can we add later dragged and dropped items to the previous FileList? obj.on('drop', function (e) { $(this).css('border', '2px dotted #0B85A1'); e.preventDefault(); var files = e.originalEvent.dataTransfer.files; files1 = files; var output = []; for (var i = 0; f = files[i]; i++) { output.push('<li style="list-style-type:square"><strong>', escape(f.name).replace("%20", " "), '</strong>');
Im getting a uncaught typeerror . i dono know what i am doing wrong. will you please explain this to me?
This is my jquery code: $(document).ready(function(){ $("#btn-1").click(function(){ $(".location").slideToggle("slow"); }); $("#sub").on("click",function(){ $(this).remove(); $("h5").text("Thanks for your comment. Your comment is submitted"); }); $(".lists li").hover(function(){ $("span").show(); }); $("#ri li #app").click(function(){ $("#ri li #app").show(); $("#list1 li").slideToggle("slow"); }); $("#ri li #ent").click(function(){ $("#ent").show(); $("#list2 li").slideToggle("slow"); }); $("#ri
Validate tinyMCE demo page out of date, no longer valid()
http://jqueryvalidation.org/files/demo/tinymce/ is using 3.x brach of tinyMCE. 4.x version no longer uses onchange_callback. New version uses setup: function (ed) { ed.on("change", function () { yourcallback(ed); }) }
I can I remove local uploaded files ?
Hello, How can I delete/remove a local uploaded file with the input type "file". With the code below I can upload multiple files, but before registration, I woull like to remove the "no chosen files" :
<script>
function handleFileSelect(evt) {
var files = evt.target.files; // FileList object
// Loop through the FileList and render image files as thumbnails.
for (var i = 0, f; f = files[i]; i++) {
// Only process image files.
if (!f.type.match('image.*'))
Not working on chrome android but all other browsers are fine
Good day none of my events seem to work on chrome android but is fine on all other browsers including chrome on IOS. I have been trying to figure out the problem for days it is something on the ajax post that is breaking my page if I remove it the other scripts work. kind regards Attached are my scripts <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="https://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script> <script> $.mobile.ajaxEnabled
JQM setting radio programmatically
Howdy - I'm using jQM 1.4.5 & jQ 1.11.1 Essentially i am trying to edit records. One page is a listview of records where clicking on the item takes you to the edit page. This process is done by sending an ajax request to the server to return some json data about the record, then altering the form via JS and then showing the form page. The form is a pretty simple form with a few fieldsets of radio inputs. Each radio input has it's own id. The js takes the data from the json return should then set
Date of Birth From Multiple Inputs
I have a form that, at some point, asks the user "so, you are born on (day) of (month) in (year)". The question is displayed on this way for a better approach on user experience, so, (day), (month) and (year) are different inputs that user selects. The problem is on organising the information for SQL purposes (for a DATA row, that stores information like that: (YYYY-MM-DD)). I was hopping there is an easy way to transfer the information collected on those three input to a fourth hidden input, from
Récupérer les valeur d'une boucle while en php
Bonjour, Comment récupérer avec JQuery/JS la valeur d'un input type "hidden" a savoir que cet input est généré automatiquement dans une boucle while , je récupère les données dans ma base de données puis je le stocke dans ces input "hidden". while {..... echo '<a href="#" class="deleteFile" ><input type=hidden" name="'.$file.'" value="'.$file.'" class="file"></a>'; ..... } Dans le script JS $( ".deleteFile" ).click(function(){ var file = $( ".file" ).val(); alert(file);
heightStyle "fill" option works incorrect if accordion container height set in %
In my case height is 100%. It's beacause a web application layout... Test example with original markup and CSS
Datepicker years drop-down
I am posting in relation to the years drop down in the jQuery date picker, as I understand it will soon be going through a rewrite. I have gotten some grief from my users that it is non intuitive to pick the first date in the drop down to reload the years list with a prior range of years. I have looked over the following post: http://forum.jquery.com/topic/jquery-datepicker-does-not-show-all-the-years Frankly, I do not find that setting a large range to be a very good solution for every situation.
file1 and file2 have the same code. Why doesn't file 1 work?
[file1] <!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-1.11.2.js"></script> <script> $(document).ready(function (){ $("#bigs").click(function(){ alert('hhaa'); }); }); </script> </head> <body> <div id="bigs"> bigs </div> </body> </html> [file2] <!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-1.11.2.js"></script> <script> $(document).ready(function(){ $("#bigs").click(function(){ alert('haha'); }); }); </script> </head>
Make responsive UI using draggable widget
I have used the draggable widget to make some divs movable inside a parent container. The problem i am facing is that when i resize my browser window then the divs which i moved do not adjust positions on the window and sometimes they do not appear within the scrollable area. The divs which i did not move get adjusted as per the window size. Can anyone provide me a solution for this.
Php on load function..?
I'm using the following code, the problem is on each page load the token should generate random string, the string is generating in localStorage but when im using php code there is only one constant string which isn't changing. $(window).load(function(){ $.post("SetSession.php",function(data){ localStorage.setItem('token',data.Token); <?php $_SESSION['token'] = getToken(); ?> },'json'); });
Hide and show table based on radiobutton
Hi, I have 2 radiobuttons "yes", "no". "No" is selected as default. If "No" is selected, then a table should be hidden. If "Yes" is selected, the table should be shown. I have used the below code, but it is not working: <asp:RadioButton ID="rbGuestTravelNo" Text="No" runat="server" Checked="True" GroupName="GuestTravel" /> <asp:RadioButton ID="rbGuestTravelYes" Text="Yes" runat="server" GroupName="GuestTravel" /> <table id="tblTravelList" > <tr id="trGuestTravel" > <td colspan="4">
parseJSON throwing error
Hi, I have json data but unable to view it using parseJSON. Uncaught SyntaxError: Unexpected token o this is what I am trying: success: function(data) { var response = $.parseJSON(data); alert(response.person_id); },
Jquery + bootstrap regexp for mobile number and phone number
<!DOCTYPE html> <html lang="en"> <?php include("dbcon.php"); ini_set( "display_errors", 0); session_start(); ?> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Rivan IT Training Systems</title> <link rel="icon" href="img/rivan-logo.png" type="image/png"> <!-- Bootstrap
Comment lire / récupérer toutes les variables d'une boucle while générée avec PHP ?
Bonjour, Je sélectionne des image dans un répertoire pour les afficher à l'aide d'une boucle while : [php] <div id="fileDisplayArea_1" class="uploadPicture">'; //Image display $dir_exist=0; $dir = $_SERVER['DOCUMENT_ROOT'].'myShop/admin/upload/tmp'; if (is_dir($dir)) { if ($Pointeur = opendir($dir)) { //echo "<p>Pointeur : ".$Pointeur."</p>"; while (($file = readdir($Pointeur)) !== false) { if ($file!="." && $file!=".." ) { //echo "<p>dossier : ".$dir."</p>"; $status = "temp"; //echo "<p>type
Newbie to AJAX: creating a counter
To get my feet wet, I have a simple page where I start a loop and I want to display the count: <body> <?php $rvars = $_REQUEST; if (isset($rvars["start"])) { for ($i = 0; $i < 10; $i++) { // The count variable $count = $i; sleep(1); } echo "Finished"; } ?> <h1> Test AJAX counter</h1> <form id="countform" method="post"> <div> <label for="start_button">Press to start:</label> <input type="submit" value="Start" id="start_button" name="start"
Menu effects
Hi, how to change class of my navigation when i scroll down. I need to change menu background color when im scrolling down trought page. Thanks in advance.
Table Column Toggle colspan problem
I have a table enhanced with Column Toggle widget. I need to have some cells merged within the row, but in some rows it can be merged, in some doesn't. See the example with the actuall problem included (turn off either column "Header 1-2" or "Header 5"). The problem turns out during the initialization as the cells in the body are decorated with wrong class " ui-table-priority-#". This way I actually can't make any workaround unless I rewrite the whole widget. Is there any possibility to fix this
How can convert option text to string.
I have a select in HTML and insert data to this OPTIONS with JSON but these text is this Format: [object object] now how cant convert this format to real string
importxml and jquery
This is not directly related to jQuery now. But I will merge it with jQuery. This issue has annoyed me for many months. [Study Material] http://importxml.org/tag/import-xml-to-spreadsheet/ [What I want] =importxml(A2, ʺ//div[@class='ledStory']//h2/a/@hrefʺ) if you have a gmail accocunt, you can use the Google Docs.
jQuery UI download single component without Core
Hi All, I hope someone can help me or point me in the right direction. I am working with a huge web application and we are planning to add tooltip support using jQuery. However there are some limitations in terms of making changes. We are already using jQuery UI 1.10.4 and we are not able to make a change to the JS file. This is in part because we are not completely sure what components are already included. So rebuilding proper set of components does not sound promising. I could build another download
Error with json
Hi, I have this page: http://www.aromaexpressbh.com/web/subscribe.php I am trying to submit the page but getting error: SyntaxError Unexpected token 5 but the page is submitting without error if I use form action without ajax. can you help please... Thanks, Jassim
a button that becomes avertical tabs
I need to add a code that displays a standard button. When the user hovers over it, it becomes a 3 clickable vertical tabs, each one with its own title and functionality. I don't even know what is the exact name of this technique(not to mention to implement it) Can someone advice or give a relevant link? Regards I. Sher
when the page is end .menu() open to top
Actually how can I explain this issue as English. But I try to show it with picture. I want when the page is end .menu() open to top
Simple Ajax test is not working
Hi guys, Could please some one help me to understand why this code is not working?: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Your Title</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script> </head> <body> <input type="button" value="Click me to load the content of another page via Ajax" id="myBtn"> <div id="content"></div>
errorPlacement doesn't 'fire' always when errors occur (jQuery Validation Plugin)
Hi, I have a simple validation for my input elements: $("#forma").validate({ errorClass: "red" }); $("#input").each(function(index, elem) { var rules = { required:true }; $(elem).rules("add", rules); }); So, when error occurs - error messages are displayed and those error messages are inside label elements. For example, if you forget to enter the last name and you click submit button - this label element will be added: <label id="lastname-error" class="red" for="lastname">This field is required.</label>
jQuery selector unable to find outer most DIV
Hello folks, I found an interesting issue while working with jQuery selctor. Please share your ideas on this issue. Here we go Below is my jQuery syntax which looks pretty good. But I don't understand why selector unable to produce expected result!!! var testHTML="<html><head></head><body><div id='outerDiv'><div id='innerFirstDiv'></div><div id='innerSecondDiv'></div></div></body></html>" Well, here #outerDiv is the outer most div and #innerFirstDiv & #innerSecondDiv are two children div of #outerDiv
Next Page