How can i do 2 different animation events like close or open with animate() just with one button(this button rotate to open and close too)?
please can someone help me? I'm trying to do an animation. This animation consisting of 2 elements: 1.- Button (glyphicon-plus-sign from Bootstrap) 2.- and a Box-Content with width:12% . when we click on the button, it rotates to negative direction and at the same time open the Box-Content width:40% with animate() which is custom animation from jQuery. Now my Problem is: i don't really know, how to return the Box-Content to the original width which is 12% and at the same time rotate again the
Help on this while loop please. Thank you!
Hey guys I am creating this code for a ticket machine. The dialog comes up for the user saying how much they want to pay. I want them to pay more than or equal to 60. Which works as I want it. However, how can I execute that piece of code again inside the while loop? because I want if they enter less than 60 the same dialog box appears again. public class TicketMachine2 { public int money(int getprice ) { while (getprice <= 60) {
After click on menu button menu open on left side but when click on More all ul has opened. I want only related UL will open. Please Help i am fresher in Jquery.....
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function(e) { $("button.menu-open").click(function(){ $("body").addClass("stickmenu"); }); $("button.menu-close").click(function(){ $("body").removeClass("stickmenu"); }); var kvd = "ul>li:has(ul)"; $(kvd).addClass("parent-item").prepend("<div class='buttonlink'>More</div>"); $(".buttonlink").click(function(){ $("ul>li").closest('ul').find('ul').toggle('slow'); }); }); </script>
price dont show after selected
Hello goodnight or goodmorning.I want to show a price different for each element of the second drop-down list without reload the page, I have received this solution but it is not not comply with my page because when I selected a element the price is not not displayed. I don't know if the problem is my HTML code or if it's my jQuery. I don't want to recover the price, I just want to show it. I have discussed this on a forum but I have not found the solution, I really want help,thank All sell phone
.css is not working
https://jsfiddle.net/martaklopf/q62yttrc/ Hello! I was trying to do something really simple, which is: -hover on the date and get text in another div to change -once the text in the second div changes to a specific set of words, the background color changes. Neither of them are working in the jsfiddle I linked, and I feel like there is a really obvious solution as to why but I can't fissure it out. Thank you :)
Adding some css to inner most <ul>
Hello, I have a JSFiddle over at: https://jsfiddle.net/hgbh43jf/ I am also including a screen shot of what I need this page to look like. What I need is some jQuery code that can traverse this tree and find the most deeply nested <ul> and add the classes as shown above and set the background to yellow for the <li>'s Thanks, Jim
Padding on all td except rows with certain class name
This is more like a pure css question where the solution might not need any JQuery. I need to set padding on all table td except td within rows with certain class name. For example: <table border="1"> <tr class="no-padding"> <td>Row 1 with NO padding</td> <td>Row 1 with NO padding</td> <td>Row 1 with NO padding</td> </tr> <tr> <td>Row 2 with padding</td> <td>Row 2 with padding</td> <td>Row 2 with padding</td> </tr> <tr> <td>Row 3 with padding</td> <td>Row
How to use a Navigation-Part in JQuery (ul.nav li a)?
Hey guys! I have a question about, how i can use a class for an jquery action. Here my example: .balken { height: 100px; width: 100%; background-color: white; border-top: 5px solid lightskyblue; display: flex; } This is a bar at the top, in it is a picture and a navigation bar, you can see that they a in a flexbox. .sticky { height: 50px; position: fixed; border-bottom: 2px solid red; border-top: 0px; }When you will scroll, the class sticky will be added to the
Reversing animation of my menu on second click
Hello everyone! This is my first post as I am just starting with jQuery. I am trying to reverse drop down animation of my menu on second click like this- $('.spinner-master').click(function() { if($('.inner:not(".animateinner")')){ $('.inner').addClass('animateinner') }else if ($('.inner').hasClass('animateinner')){ $('.inner').removeClass('animateinner').addClass('animateinnerrev') } }); You can see it here: http://codepen.io/i76/pen/KgWNxE The menu opens but it does not close (reverse) on second
move image angle direction on google map
I try this code for plotting data on google map This code is generate table through jquery and plotting data on google map and also on load small content window is display on every marker success: function (result) { var d = JSON.parse(result.d).response; console.log(JSON.parse(result.d).response); console.log(JSON.stringify(result.d).response); $("#tabledata").empty(); if (d.length > 0) { $("#tabledata").append( "<thead><tr><th>No</th><th>DateTime</th><th>Status</th<th>Longitude</th><th>Latitude</th</tr></thead>");
xml selector pattern
I'm using jquery to manipulate an xml doc like this: $(myXml)... My xml has a root of <svg> and child <g> elements. 1 <g> has an id of "flowline" with multiple <path> elements. What would be an elegant selector to select all of these particular <path> elements? Something like: $(myXml).find('svg g #flowline path') ?
How to split a string using JQuery?
Hi all, New here, so hello. I'm using a system called K2 and use a Web service to return an address string is this format: 123 K2 Avenue,K2Town,K2County,K21456 This string is in a Textbox, so I need to know how I can use Jquery to split this string in separate Lines. I have 4 separate empty textboxes, so I can use separate Jquery to split the string to each line (based on comma count) But I don't know any Jquery, would anyone kindly create the first Jquery to split the string to show just the "K2County"
If radio is checked, check another radio button else
Hi, I two groups of radio buttons when one is selected i want automatically change the checked status of the radio buttons in the other list. For Example https://jsfiddle.net/4n5121f6/ In my fiddle; the default checked status of the door options is the first radio button the default checked status of the handle options is the first radio button When i click on "Door not required" from door options i want the door handle options radio button to set to last option "SET TO 0" If i click on any other
find html and change the corresponding div text in the family
hi, i have the following html. <div id="TrainingPrograms"> <div class="TrainingItemBloc"> <div class="ImageIconHalf"> <img style="width:100%;height:95px" src="#"> </div> <div class="TrainingItemText"> <div class="TrainingItemTitle">Supply Chain Fundamentals</div> <div class="TrainingItemDescription"> Explore our six Supply Chain functions and discover how our expertise creates value for our customers and drives success in the World's
Call ID in jquery
I try this method to get data and also i have try jquery . In jquery i call info method [WebMethod] public static string info(string id) { try { string result = ""; Entities er = new Entities(); List < sp_web_Result > sv = er.sp_web(id).ToList(); DataTable dt = new DataTable(); dt.Columns.Add("No", typeof(string)); dt.Columns.Add("Latitude", typeof(float)); dt.Columns.Add("Longitude", typeof(float)); foreach(var c in sv) { dt.Rows.Add(c.No, c.Longitude, c.Latitude); }; result = DataSetToJSON(dt);
$.Extend error after Chrome Update 53
After the Chrome update 53, many of Jquery libraries that I am using in my projects are displaying "Maximum call stack size exceeded" while rendering the components. The stack trace shows $.extend method call as the error cause. Everything was working fine on Chrome 52, but this new update has broken most of the libraries. One curious thing is that this error happens intermittently. Has anyone ever experienced this? Thanks
How to get selected text in a textarea and style it?
Hi, I'd like to know how to obtain the selected text inside a textarea and style it. So I can create my own inline text editor. So if I press a button while I have something highlighted it will turn bold. Thank you
Assigning MULTIPLE .css() statements? !important required?
Assume I select a certain element and want to assign NOT only ONE but MULTIPLE css statements. How do I do this? For ONE .css() this works fine: $(......).css({'background-color' : 'red'}); But what if I want to assign a new font-size as well? Do I really have to write two separate lines? I would appreciate if I could group them together into one line similar to $(......).css({'background-color' : 'red', 'font-size' : '11px !important';}); but this does not work. By the way: Is the !important statement
How to code payment form in a modern way
Hey guys , so suppose you have 3 forms , like so: FORM 1 FORM 2 FORM 3 Now how would you code these form's in a modern way ? I.E. i beleive in the pre-AJAX period the form's would be separate pages , but what about now , i would really like the forms to us some ajax and then once the first form is submitted i would like the 2nd form to come in with some animation and so on .... So now , how exactly do i store the 2nd and 3rd form ?? iframe ??
Menu secondary links to anchor links and smoothScroll content
Hi Everyone, I'm new to jquery and hoping that someone might be able to help me resolve my problem. I've spent a lot of hours testing and scouring the internet to try and find a solution. I have a main menu navigation that has secondary links to a page with anchor links that open up content below it using smoothScroll. I’ve been able to get the anchor links on the page to highlight after being selected and the secondary links in the main menu nav to go to the correct content, but if I select one
text editor with jquery
hi every on , im creating a text editor , my problem is : how can i , for example , when select 3 text node that each one have parent : p tag , and click bold button , each text node wrapping by <strong> tag and replace with current text node that already have p tag as parent , sorry for my bad english !!
animation effects function
what are the animation effects are there like swing ? i know only this swing can anyone send me full list of animation function.
Expand DIV view on toggle
I have a simple toggle script which will expand /hide a menu. How can I expand the height of the parent container if I toggle off the view of my menu? <script> $(document).ready(function(){ $( "#route_btn" ).click(function() { $( "#silver1" ).toggle( "slow", function() { // Animation complete. }); }); }); </script>
Finding the offset of a container taking border and padding into account.
I can find the offset of an outer container (such as a DIV) from the document using offset(). However suppose I want to increment the offset by the width of the border of the DIV (if there is one) and the padding as well. How would I do that?
Recursive function
Hi there, I have a table in which each row has its ID and PARENT-ID who points to the parent row(record). I am trying to create a recursive function to remove a parent row and all its children rows. of course child row might be a parent of other rows. Following code is not final and might be buggy. function removeBranch(bID) { var k = $("[pID='" + bID + "'][isparent]"); if (k.length > 0) { $.each(k, function (i,o) { removeBranch(o.id);
Clone a table
Let's say I have a table like this: <table id="table1" style="width:50%"> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> </table> How do I clone this table, and at the same time change id to "clone1"? And preferable put it horizontally next to table1.
how to use splice to remove course from jquery code
in the view model i need to remove the course from course list using splice by javascript i need to delete index without any problem so that i use splice how to do that if possible @model WebCourse.Models.Cusomemp2 @{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Edit</title> <script src="~/scripts/jquery-1.10.2.js"></script> <script> $(function () { var index = 0; $("#CourseId").change(function
Click Event does not work on dynamically load content
So I'm including HTML via AJAX in jquery. I now want to do events based on clicks from within this HTML. How can I do this?
Hyperlink on more tds
Hello I need your help to set a hyperlink on multiple columns in a table html. Let me explain: The following code I want to set a hyperlink from the second to the fourth column of the table. <tr> <td>1</td> <td><a href="#">Name 1</a></td> <td>500,00</td> <td>50</td> <td>22</td> </tr> In this way it is only set for the second column. How do I set until the fourth column? Thank you in advance Tegatti
cross fade images jquery-infinite-rotator
hi i'm using this code to play a series of images cross-fading in an infinite loop. What I'd like to do is have a button that will hide the div that is displaying the looped images then another button that shows it again BUT when clicked it starts the loop from the beginning, that is to say the first pic should be seen right away when the div fades back in. At the moment I have it set up just to fadein /out the div but can't figure out how to play from the first image. seen here: http://www.mediaflash.ca/rotator/index.html
How can I calculate dates in jQuery, and set an input date's value to that?
I have this html: <input class="smalldatepicker" type="date" id="datepickerFrom" value="2016-09-04"> </input> <label class="cccsfont"> to </label> <input type="date" class="smalldatepicker" id="datepickerTo" value="2016-09-10"> </input> Which sets "datepickerTo" to the last Saturday (this is based on today's date of Thursday, 9/15) and "datepickerFrom" to the Sunday before that. This is manually added, though; I want to do it programmatically, in jQuery, something like: var
jQuery mouseout event takes time
I am using jQuery1.8.3 version. jQuery mouseout takes around ~1500ms when DOM size increase. PFA. Could you explain why mouseout event fire and how to avoid "mouseout recalculate style"?
Replace text by text() does not work
Assuem I have somewhere on a web page the following text: "aa bb cc". Now I want to replace this text by nothing (or one blank). Then the following does NOT work: $("aa bb cc").text(''); Why?
Wrong link handler fires
Hi there, I have this code which adds a row that consist of a td which holds 2 links, a tag's, each have its own click event handler. Clicking the Add link fires both links click handlers while clicking the Cancel link fires the Cancel event handler only. Why does the Add link fires both handlers ??? Thanks, Shai
JavaScript and Custom Error Messages on an HTML5 Contact Form
I am trying to add custom error messages to my HTML5-based contact form, with JavaScript, and I encountered an issue in that, though I can get the custom messages to trigger on an invalid entry of a form field, they also trigger and prevent the form's submission when the input's validity conditions are satisfied; below you will see the javaScript and corresponding HTML markup, that relates to this issue; how can I fix this?: <label>Name <input required id="name" name="name" placeholder="Name" tabindex="1">
jQuery Ajax parsing the response data properly --
Hello members. I need help on a certain jQuery data parsing thing. I’m doing a regular jQ ajax call and executing some server side code in C# which is returning me data. The data which the server code is returning, is basically nothing but an object of a model class [which has some properties of its own] with the values assigned to the properties fetched from db. That’s all fine. Now in the block where I am receiving the response like success: function(data) { //things need to be done
What's supposed to be the correct syntax to call function that has jQuery ajax within?
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> // ajax call for a server side script with State and County parameters function ckCounty(st,cunty) { $.ajax({
url: 'whateverScript.file?state='+st+'&county='+cunty,
success: function(rtn) {
if (rtn > 0)
{
return 'green';
}
}
});
} var Color
Problem with .each() function
Hi all, I have a problem with .each function. FIDDLE I store strings in an array called "$list2" using .each function on an array("allElems"). The problem is when I read $list2 I see that the word "undefined" is concatenated to one of the strings in the array. I debugged it and I see that the last index is not supposed to be added, but it does. For example: Let's say there are nine (9) items in the array("allElems") . The index range of that should be 0-8, right? When looping through it with .each,
getting value of a clicked element
If I have an img tag with id="blah" and value="x" I know can get the value with: $('#blah).val(); but if I have that several img tag created in a foreach() loop, how can I get its value as several selectors with the same id is not possible? probably I can use id="blah[]" or I can append an incrementing id like id="blah1", id="blah2", then how can I get the value as I will not know the id? or may be I should just use a .click() event to get the id of clicked element then get its value by id? if yes,
Width of progress bar incorrect
I created an animated progress bar but it doesn't work as hoped for. I want 20% of the bar to show up but 100% of the bar shows up instead. It does however show the percentage correctly. I link to jquery and modernizr. Here is my javascript $(document).ready(function() { if(!Modernizr.meter){ alert('Sorry your brower does not support HTML5 progress bar'); } else { var progressbar = $('#progressbar'), max = progressbar.attr('max'), time = (1000/max)*5, value = progressbar.val(); var loading
Next Page