How to
how to like using jquery and php such as image 1 new tweet, 2 new tweet and many more
RegExp.test inside selector.each question
I have the code below looping through 2 text fields with PhoneNumber class. I have tried multiple RegEx strings to validate that the user inputs xxx-xxx-xxxx (using jquery 1.7.1.min) - no console errors No matter what i try, i still can't get them to match the regEx string. I know there is some javascript, but i hope with the amount of jQuery i am using that i can post this here. Is there something simple I am missing or is my concept wrong or do i just keep using incorrect regEx strings? Any
Auto Explode and Implode image (or background picture) with Jquery
Hi. I wanna do explode and implode image in jquery. I have my codes, when the picture width is 600 px. it's function but, when i size up picture to 1200x800 px, the picture is broke. Please could you help me for that ? Here is the codes : HTML : http://denemekod.byethost15.com/explode.htm CSS : http://denemekod.byethost15.com/style.css
clone and change
Is there a problem with trying to fire a .change() on a cloned item? It's not working and I can't figure out why. $("#Category").change(function(e) { var question_set = this.value; var replace_set = $("#question" + question_set); // reset box $("#question_box").html(""); $(replace_set).clone().appendTo("#question_box"); $("#question_box div").attr('id', 'question_set'); $("#question_box select").attr('id', 'question_one'); $("#question_set").removeClass('question_hidden');
IE8 object doesn't support this property or method
I am building web apps for a company and it had worked in IE9, Firefox and chrome no problem. Using IE8 (most of our departments use) I get an error "object doesn't support this property or method". The line it's showing me is: Var index = arrDates.indexOf( currDate ); There is a plugin of a calendar which shows up and when you click on a date it's supposed to pop up an input field so you can type. That input doesn't show up and I get the above error message only in IE8. Also some other web apps
selectmenu() undefined is not a function
Hi, I am trying to use : $('select').selectmenu(); but I got : I think select menu is a function from jquery ui.
Problems creating url with query string
Hi all, I'm tring to create a url with query string data using a form with multiple dropdown options. I'm using the first dropdown to select the url and the second dropdown to add the query string to the selected url. The change method updates variable values and the click event merges those variables to form the url. The problem is that I can't seem to tag anything onto the end of the url. I've read about using the $.param function but I have yet to find an example where the output is appended to
[Ques] how to express a selector with a variable
Animation doesn't work. var large_s = '#b' + last_value doesn't work. I tried var large_s = 'b' + last_value, $('#' + large_s). But it also failed. <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){ var now = ["tre", "men", "dous", 2]; var last_num = now.length - 1; var last_value = now[last_num]; var large_s = '#b' + last_value; $("#b1").text('#b1' + now[1]);
Problem with DST timings.
Hi, I have problem with jquery weekly calendar,if I select availability in the calendar for 03/09 and 02/11 (as per DST standards 03/09 and 02/11 has 23 hours )dates not getting availability for 24 hours,getting availability for 23 hours.so how can I avoid this problem.please help me. Thanks in advance. Thanks & Regards, Nani.
Result of offset().top returning wrong value in Safari
Using WordPress Twenty Fourteen theme, edited to add a banner image, the menu bar is supposed to scroll until reaching the top of the page, then stick. In Safari 7 (Mac) alone among my browsers, the menu bar jumps to the top of the page after scrolling a very little. If you have Safari 7, you can see the odd effect here: hucklesby.com Using the dev tools I traced it to this code (in functions.js): mastheadOffset = $('#masthead').offset().top - toolbarOffset;The value of toolbarOffset is zero. But
addClass and removeClass not working for me - not rocket science but I'm stuck
Hi all. I am trying to do something that should be a no brainer, and I just can't get it right. I have 3 buttons on my app. When I click one, it shows the content for that button and the other div that was showing vanishes. That works fine. What DOESN'T work fine is the button doesn't get the class of active_button applied to it. (The inactive buttons are class=inactive_button). So clicking a button to see that content should RemoveClass(active_button) from the active button and addClass to
Initialize a string.
Hi to all. I have a problem with a js function where I use a string to import some values from a dropdown list (dataGiusti). It works fine at the first execution. If I need to execute it again the string contains the preview values. When I reload the page it works fine againg, but just the first time. This is my function: <script type="text/javascript"> var dG = ''; function salvaGiustificazione(arg1) { var x1 = document.getElementById('dataGiusti'); for (var i = 0; i < x1.length;
Problems getting to json internal data
I've been using jquery for awhile, but am still learning quite a bit of new stuff about it all the time. I am currently working on part of a project that sends an ajax "POST" request to a Python/Django view where its processed successfully and then returns the results of a json.dumps() method in an HttpResponse like this: response_data = json.dumps(str(qrydct),sort_keys=True) return HttpResponse(response_data, content_type = 'application/json') back to a jquery "SUCCESS" handler function. So far
Security issue about jQuery
We use jQuery library v1.11.1 and v2.1.1 in our applications. But the fortify security code scan reported an issue about jQuery library. The issue is "Standard pseudo-random number generators cannot withstand cryptographic attacks." Will you fix this issue in the next generation? Thank you!
submitHandler:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. the script below submitHandler:function(form) { // var data = $("#tracking-form").serialize(); var location =$("#location option:selected").text(); var hwbno =$("#hawbno").val(); $(form).ajaxSubmit({
What is the equivalent method for not() for arrays?
The not() method is only for DOM elements. But I need the exact same functionality for simple arrays. What can I take?
what is meaning jquery
what is meaning use strict jquery
only loading jquery and chrome - Uncaught TypeError: undefined is not a function
Hello, i have a strange problem with jquery and chrome, current windows version. i have this bit of code <!DOCTYPE html> <html> <head> <title>test</title> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> </head> <body> </body> </html> and in the error log in chrome i got Uncaught TypeError: undefined is not a function Why ? What is wrong ? test
Radio click event, add value
Hi, The following code works, but I need to add an additional value to the total amount. This value is the tax and is retrieved from the database. Any help greatly appreciated. Thanks! $("input[type=radio]").click(function() { var total = 0; $("input[type=radio]:checked").each(function() { total +=parseFloat($(this).val()); }); $('#total, #total2, #total3').text(total.toFixed(2)).currency({
How to position dialog where the hyperlink is clicked???
The position property makes the dialog to appear in some fixed position. I want the dialog to be opened in the same position where the hyperlink View Profile is clicked. Please help me with this code, Thank You in advance <td style="background-color: rgb(194, 214, 155);"><span style="color:#000000">Mrs. Shilpa S</span></td> <td style="background-color: rgb(194, 214, 155);"><span style="color:#000000">Assistant Professor</span></td> <td style="background-color: rgb(194, 214, 155);"><span style="color:#000000">B.Sc,M.Sc,
Easing options not working
I have created a horizontal image slider - it shows 3 images and then after a set period of time the images slide to the left. The first image (that just moved off "screen"is then moved to the bottom of the list of images. So the images continue to loop indefinitely which is what i am wanting. What is not working for me is the speed at which the animation occurs - it is too fast and I would like the movement of the images to the left to be slower and smoother. I have tried easing options but they
$(".myClass").length = 6 but $(".MyClass").each() runs only once - Why?
I have six <a> tags, each with class "myClass" console.log( $(".MyClass").length ); writes 6 to the log file like I expected, but $(".MyClass").each( function() { console.log("test"); }); Only writes one "test" to the console log - why not six times? One for each .MyClass being found... Can someone advise ? Much appreciated!
Copying/Cloning CSS Classes and Div's
Is it possible to clone CSS classes and ID's and if so how do I go about doing it? For example I have, #firstClass {font-size:24px;} I want that copied into #secondClass; and then something similar duplicating an ID. Thanks in advance.
Matching on list elements
I am currently using the following line of jQuery to filter a table. $("td.tag").not(":contains('" + $("#filter_grade").val().toLowerCase() + "')").parent().hide(); Where #filter_grade is a text input box. <input type="text" name="filter_grade" id="filter_grade" class="filter"> The .tag class is on a hidden column like the following. <td class="tag" style="display:none;">272,13-292,</td> Is there an easy way to modify the jQuery so it only matches complete strings in the list and not partials, so
filter and remove
I want to filter data by company, by amount and show only the last row in column dollar and peso. please see screenshot, the data will be based in database. here's my html tag echo "<tr> <td>".$r['Name']."</td> <td align='center'>".$r['date']."</td> <td align='right'>".number_format($r['NetDollarPayOutReplenishment'], 2)."</td> <td align='center'>".number_format($r['NetShare'], 2)."</td> <td align='right'>".number_format($r['NetPesoReplenishmentLOC'], 2)."</td> <td align='right'>".number_format($r['NetPesoReplenishmentUSD'],
jQuery and Adobe Muse
Hi Everyone, Forgive my ignorance but I've been struggling with this little issue all day and I'm not sure whether this a jQuery issue, my issue (very likely) or an Adobe Muse issue (equally could be the cause). I'm trying to make a smooth transition between separate pages when any link on the pages are used. This is the code I'm using (below) but as you can see from the demo (also below) I seem to get a "flash" of the page its about to load before the fadeIn. Any ideas? code with in Muse: <script
How to get the 2nd column value of dropdown list.
Hi, I need your help because I want to get the value of the second column of dropdown list. I populate it when I click on the checkbox in this way: var chk = $("#chk"+arg2).is(':checked'); if(chk == true) { $("#codiciGiusti").append('<option value="' + arg1 + '">' + arg1 +' '+ dataAssenza +'</option>'); }else{ $("#codiciGiusti option[value='" + arg1 + "']").remove(); } and it works fine. My problem is how to get the second column value (dataAssenza) from it. Thanks
Safari form.submit() does not post input type="submit" name and value
Hello, trying this code in Safari the form.submit() function does not post the name and value of the input type submit named "send". Changing "submit" with "button" seems to work. <form id="test-form" name="test-form" action="test.php" method="post"> <input type="text" name="name" /> <input type="submit" name="send" value="send" onclick="send_form()" /> </form> <script type="text/javascript" > function send_form(){ $('#test-form').submit(); } </script> In Chrome and Firefox
scrollbars and overflow: auto and boxmodel
I was hoping setting this CSS stuff thru JQuery would make stuff "just work" but I haven't found the incantation and my searches here don't land on what I need. What I want to do I think would be pretty common. I want to assign a rectangular area for some content and then have it pop a vertical scrollbar if the content exceeds the height of the box. I would like the have the scrollbar appear inside the content rectangle. But I see different behavior in the big three browsers, with the scrollbar
Sending $_FILES through JQuery
Hello I'm doing a form which contains a gallery with PHP+MySQL. I'd like to add the possibility to upload images using jQuery in case of the image I'd like to use is not in the gallery. The problem is, $_FILES doesn't send through $.post.... I was reading and, as I understood, this is not possible. Another option would be open a pop-up window to upload the file. But in this case, when I go back to the form, the pictures must be updated with no reload it (because if I reload I miss all the information
unable to drag
I am trying to drag an object on a drawn rectangle. I do not know what is wrong I am new to jquery ty very much <html> <head> <link type="text/css" rel="stylesheet" href="drag.css"> <script type='text/javascript' src='drag.js'></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script> </head> <body> <div style= "width:500px; height:500px; border:1px solid #000;"> <img src="images.jpeg" id="car"> </div> </body> </html> my js function $(document).ready(function(){
Looking for a good multi effect jquery slider
Does anyone know of a good jquery slider plugin that allows for various custom animations of multiple elements in each slide? Or does anyone know of a good tutorial that covers how to build one?
Method to retrieve the request headers about to be sent
The native XMLHttpRequest API doesn't have methods to get request headers. It would be useful to add one to the jqXHR object, to facilitate debugging and test automation. User requests dating back from 2011: http://stackoverflow.com/questions/7564007/get-sent-headers-in-an-xmlhttprequest http://stackoverflow.com/questions/9102279/is-there-a-way-to-get-all-the-request-headers-in-a-jquery-ajax-call ... and "request headers" showing up in Google's autocomplete when searching for "jqXHR get".
How do i repopulate custom html control dynamically
I am not sure if this is the correct place to post this so I will. I using MVC 2.5 . I need to repopulate a custom html help control in a view on an ajax call back, The custom control is an item in unordered list. I am trying to recreate the view for the list item in the ajax call back but am happing trouble with how to code this. Below is the c# code for the custom control, the view code that contains the custom html control ,and the method the ajax call back would call to recreate the list item
how do i retrieve dom array in .on() event?
for example <script type="text/javascript"> $().ready(function(){ $('input').on('change',{name:'Lcb'} , ShowMessage); function ShowMessage(MyEvent) { alert(MyEvent.data.name); } }); </script> </head> <body> <input type="text" value="1" id="test[]"/> <input type="text" value="2" id="test[]"/> <input type="text" value="3" id="test[]"/> <input type="text" value="4" id="test[]"/> <input type="text" value="5" id="test[]"/> </body> </html> how do i get array index of trigger object?
Jquery Output and Play Audio Elements from Json Array in Correct Order
I am having trouble with outputting audio elements from a Json array with Jquery. Here is my Json array which contains images, text and audio: "questions": [ { // Question 1 "q": "<img height=100 width=100 src=\"js/Question1Option4.png\" />", "correct": "<p>Bag</p>", "audio": "<audio src=\" js/Question1.mp3\" ></audio>" }, { // Question 2 "q": "<img height=100 width=100 src=\"js/Question2Option2.png\" />", "correct": "<p>Eraser</p>", // no comma here "audio": "<audio src=\" js/Question2.mp3\" ></audio>"
I can't select the .current section
Hello I'm stuck. I've the following structure: <section class="gallery" id="media-home"> <ul class="list"> <li class="selected">Photos</li> <li>Videos</li> <li>Attachments</li> <li>New</li> </ul> <section class="gallery-item current"> ……… </section> <section class="gallery-item"> ……… </section> <section class="gallery-item"> ……… </section> <section class="gallery-item">
Parse JSON object and reveal with a "show" function
Hi, I am attempting to use Jquery plugin script to parse/output elements from a JSON file. The script that I have so far can parse one set of elements, but not a corresponding set. The JSON file structure is as follows: "questions": [ { // Question 1 "q": "<img height=100 width=100 src=\"js/Question1.png\" />", "correct": "<p>Answer1</p>" }, { // Question 2 "q": "<img height=100 width=100 src=\"js/Question2.png\" />", "correct":
jQuery Query Help
With the following code I need to locate all elements with a cell_name that starts with the word Driver. Once I identify these rows I need to select the data_table element within the same row and change the css class. Any help with a fast and efficient query. <table> <tbody> <tr class="row_folder"> <td class="matrix_cell"> <div> <div class="cell_name">Driver #1</div> </div> </td> <td class="matrix_line"> <div> <table class="data_table folder"> ... </table>
how to change title
how to change title each number inside
Next Page