Find and add class for menu.
I'm working on a simple full width menu whereby the list items are in one div and the inner menu is somewhere else. i have done a fiddle - https://jsfiddle.net/szrqwL9h/ Basically i need to link each navigation item to the dropdown but this needs to be done in a way if more top level categories are added the menu will open for a new category. Any help would be appreciated. i did try $(".MastHead").find("NavDropdown").addClass('open');But didnt seem to work
Some icons in Jquery UI 1.12 have changed slightly their position?
I'm upgrading from version 1.11 to 1.12 and I noticed that in the stylesheet definition some icons changed their location on the sprite 1 pixel. For example: Now: .ui-icon-triangle-1-s { background-position: -65px -16px; } Before: .ui-icon-triangle-1-s { background-position: -64px -16px; } Now: .ui-icon-arrow-1-s { background-position: -65px -32px; } Before: .ui-icon-arrow-1-s { background-position: -64px -32px; } Other position changes involve ".ui-icon-caret-1-s" and ".ui-icon-arrowthick-1-n"
AJAX: Sync faster than than Async?
You wouldn't think so, but in Chromes Developer Tools Network tab, I can see Async: false returning results faster then Async : true. I want to use Async:true, but is it slower... (and wont lock the browser). These are NOT time intensive calls.. Async avg = 800ms, Sync avg 300ms. I'm running 9 requests simultaneously, because of the 6 simultaneous connects limit, I see 3 are queued when running Async. FYI: jquery-1.6.2 Any explanation why Async:true is slower? I can publish snapshots of the
select menu widgets does not reset selectedIndex when recreated.
Hi, In our JQM application, we recreate option lists for a select menu widgets, but the selected index does not reset to -1 when options are recreated. there is demo http://1.zgwphpt.applinzi.com/zgjs_test.html <div data-role="content"> <input type="button" value="click to test" onclick="test();"> </input> <select id="sel-test"> </select> </div> function test(){ $("#sel-test").empty(); for(var i = 1;i <10; i++){ var opt
dropdown selected value is not firing in IE and working in chrome
<script type="text/javascript" src="jquery.js"></script> <script> $(document).live('dblclick', function(event){ var $target = $(event.target); if($target.is('select option:selected',this)){ alert('ok') } }); </script> </head> <body> <select name="select" id="select" size="10"> <option value="one">one</option> <option value="ert">ert</option> </select> //This code is working fine in chrome but not working in IE.I wanted to work this code I am I am double clicking on element only.My
Scroll is not working on ios9 using jquery mobile 1.4.5, Please help me.
Dear All, My website scroll is not working on ios9 using jquery mobile 1.4.5. I already added "style="overflow-y:scroll;-webkit-overflow-scrolling:touch;" but it won't changed. So, I changed -webkit-overflow-scrolling:auto. It is working well but no smooth. How to do to smooth the scroll. Please help me.
[SOLVED] Page not scrolling right while dragging ui draggables
I would like my page content to scroll right on smaller screen sizes while dragging draggables. How can I achieve this? You can see the issue here Login using user demo p/w demo99 Navigate to the menu planner under "menu planning" in the top dropdown menu. Reduce the browser width so that some of the menu planner is not visible Open the left menu, navigate to a recipe in the Recipes menu and try dragging it to somewhere on the menu planner that is not currently visible.
Autocomplete - Custom data and display
I cannot make it works. There is a Products table (codigo, descripcion, precio, cantidad), typing part of the codigo field should appear the other fields on the list, to select one. However, the list appears with the correct amount of records but with UNDEFINED on every value. Any idea about why the script is not taking properly the values sent by search.php ? Thank you ! INDEX.PHP <script> $( function() { $( "#codigo" ).autocomplete({ minLength: 0, source: 'search.php',
Having Issue on Simple Custom Plugin
Can you please take a look at this demo and let me know why I am not able to pass two different options into my plugin? $.fn.contact = function() { opt1: function() { this.append('<a >Hi</a>'); this.css("color", "red"); return this; }, opt1: function() { this.append('<a >Bye</a>'); this.css("color", "red"); return this; } }; $(".plug-txt").contact({ opt1 }); <div class="container"> <div class="plug-txt"> </div> </div>
advice please: unable to clone a row and dynamically change the second select value when changing the first select
I have dynamically added new row by cloning the last row. The row contains two select picker control. I made another function that dynamically change the value of the second select when changing the first select. This function is not working on the cloned rows. Any idea what I made wrong?? <html> <head> <script type="text/javascript" src="./include/jquery/jquery-1.2.6.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#btnDel').attr('disabled', 'disabled');
Hellp with Jquery Argument / Statement
I have a custom piece of script that i am trying to modify. The function of this is to display a Pricing Table. One product may have hundreds of pricing tables depending on what attributes are chosen. As it stands, it will only show one at a time and only if attributes are selected. /** * VARIABLE PRODUCT PRICING TABLE */ function rp_wcdpd_switch_variable_pricing_tables(element_id) { jQuery('.rp_wcdpd_pricing_table_variation').hide(); jQuery(element_id).show(); } if (jQuery('.rp_wcdpd_pricing_table_variation').length)
How to use foreach loop in jquery?
How to loop in jquery? I am having 1 issue like: var current = 0; jQuery(".bod-item").each(function() { alert("#pi-"+current); jQuery("#pi-"+current).click(function(){ alert("#mob-"+current); jQuery("#mob-"+current).slideToggle("slow"); }); }); current++; Now what I want is I have 3 `bod-item` Each bod item has its separate id like: bod-item #pi-0 bod-item #pi-1 bod-item #pi-2 When #pi-0 gets clicked,
How to do this JQuery Menu effect?
i want my website can add this function or copy this function. How to do this? When i mouse hit the photo. The photo will display some word. the photo below: the website address: http://activtek.eu/ Thank you very much for your help.
Bend or Wind Effect
I'm hoping someone can help me, I want to apply a dynamics effect, wind to be exact whereas the image sways, left and right; as long as I have control over the pivot for the image, any suggestions, besides GSAP although great library, this it cannot do unless I go the HTML canvas route which is a bit much for this effect.
getting my 1st query to work
Hi, Trying to work out why this query wont work. Some background is that the site is a DNN site with a specific forms module. Its common practice for knowledgeable users to insert jquery but I just cant seem to get mine going. As a starting point, I just want to hide a field & label that sit in their own row. Thanks to a member I have determined that the page is running 1.9.1 Code I have used is (I think the system puts in (jQuery);). Below that is the row that is being referred to. </script> <script
Troubleshooting approach for my 1st script
Hi, I'm trying to get my 1st ever script going inside a page that I suspect already has Jquery loaded. 1st question before trying to work whit it wont work is how can I be sure that Jquery is in fact loaded to the page? Firebug shows JQuery under script tag in the watch section. There is no errors on the Console tab. (javascript errors enabled) Thank in advance Todd
Assign key value pair in each loop
I'm trying to assign key/value variable pairs to an array w/in an each loop, but keep getting undefined on line #6 on the second pass of the loop. My key (mylabel) & value (myvalue) are extracted from form inputs. I'm going to post this to a php file to send out the responses. var arck = 0; $('all my form targets').each(function() { var mylabel = some text; var myvalue = some text; if (arck == 0) {var post_data = new Array(); arck = 1} post_data[mylabel] = myvalue; }); Simple example of
Adding content to an iframe
Hi, Looking at these pen, I'm trying to add content to an iframe. Adding content to an iframe Another example What am I doing wrong? What is the best way to add content to an iframe? Thanks
how to generate dropdownlist dynamically without repeating the selected items in previous fields
Hi i need to avoid already selected option in dynamically generated fields. How to achive this. Please see the image. and updated link https://plnkr.co/edit/aQxytwuYldBzy1dzBQl5?p=preview
jQuery Syntax assistance filter function - wrap element according to condition
Using jQuery version: jquery-1.11.1.min.js I have code that shows or hides elements according to filter.I need help including a condition where if the browser is IE then according to the filter wrap the unmatching elements with a SPAN and hide them, and the other way around - unspan and show. I do not know the syntax and I failed repeatedly. I'm really stuck, please help (if you can by tweaking my code) My Code: <!--This is where I filter the ListBox (select) >> (option) elements via keystrokes -->
Running the datepicker library initialization code after loading in using getScript.
I'm running datepicker controls on several pages and I want to put as much of the datepicker management in one place/file as I can, so to this end I have created a wrapper for datepicker, that loads the datepicker library and contains several functions that patch datepicker features/functionality to work the way that I need. The wrapper file is loaded in each page using the normal <script src> tag, after the JQuery library is loaded. Inside the wrapper file the datepicker library is loaded using
Identifying string "No " causing great anquish
Hello. I am trying to hide an associated 'tr' when a value in a child 'td' == "No " in the html the No string is written No For the life of me I can't figure out how to specify this in an if statement so i can hide the row. If you would like, the fiddle is here: https://jsfiddle.net/vhabhsrosed/sj3pxc50/12/ my desperate attempts at code are as follows: HTML <table> <TR><TD width=190 class=ms-formlabel noWrap vAlign=top><NOBR>Request Expedited</NOBR></TD> <TD width=400 class=ms-formbody id=n17WPQ6
Jquery - Sortable : How to prevent the drag should not goes to below after a desied row.
Hi All, I have a query that , I am using jquery sortable http://jqueryui.com/sortable/#default Open the above link , My requirement is that if any user drag the item 1 in y direction and when the item 3 goes up the y direction drag should be stopped. Means dragging element should not drag below the item-3. Only possible drop area of item 1 is between item 2 and item 3 between item3 and item 4 help me to do this.
Please document .data/$.data caching
Neither the $.data nor the .data() documentation mention the cache system. I was retrieving objects using .data, and then setting a value in the object. Subsequent calls to .data didn't return the original object but the modified version. I had no idea there was a cache, it was very confusing. https://api.jquery.com/jquery.data/ https://api.jquery.com/data/
Targeting elements except $(this).children(element)
Hello, guys. Here is the code, which i am typing about http://codepen.io/Jacgues/pen/AXakkg As you can see, I ve used to methods to achieve proper funcionality of the menu. The problem is whenever you click Cart position, it doesn't show up. Seems like it is not targeted correctly, so all elements of this kind are "hide()" but no this particular one, which i would like to set as an exception. In case of clicking Account or Help, the toggle() doesn't work. My goal is to acheive toggling the child
jQuery start and stop in asynchronous code
Hi, I was able to stop and restart an animation with the following code. Could someone who has some understanding tell me if this is a good way? I have seen there is a way to pass a variable like “fx” to the queue dequeuer and clearQueue functions. I don’t know how to use it yet; could somebody show an example. I am thinking that it could be helpful here, so I can remove a queue for some time and pick it up later (e.g mouseover). This project has taught me about asynchronous code because it is underneath
Load menu from html file is not working
hi. i`m trying to load a menu from an other html page. (something simple, but it`s not working) My index.html: <script src="js/jquery.js"></script> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <script type="text/javascript"> $(document).ready(function() { $('#navbar').load('nav.html'); });
Checking if a selector and a method combination worked
I want to test if something was successfully appended because I do not know if the selector worked (actually selected anything or even was a valid selector). I read that you can test if a selector worked with if ( $('#someDiv').length ){ } But would this also work for if ( $('#someDiv').append('<p>appended</p>').length ){ } Or do I need to do a plain selection first without a chained function, and then append, as in the first example?
get the value of row before changing in table if cancel click jquery
in my code below i can edit row success without any error but if i need to cancel value edited in row OR get value before changed what i write to cancel edit in row in table by using jquery my code as following @{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <script src="~/Scripts/jquery-1.10.2.js"></script> <script> $(function () { $("#btn").click(function () {
Getting contents of table cell
for(i=0; i<lotteries.length; i++){ document.write("\ \ \ <table id='lot"+[i]+"'><tr>\ \ <td>\ <table border='3'>\ \ <tr> <script language='javascript'> if(lotteries[i][5]=='') {document.write('<td width='+(lotteries[i][3]*7+12)+'
Append after element was created without reload
Hey! I have page. Then I create element like: <div id="element1></div> I need add something to this element without reload page... When I do something like: $(document).on('click', '...', function(){ $('#element1').append('...'); }); This doesn't work ( How I can do this ? pls help...
How to add a drop down menu to my webite
Hello everyone, I'm having trouble adding a drop down menu. After trying for hours to get it to work, I just finally restored my menu to the way it was and decided to ask for help. I can give you more code if needed but here is my HTML for my menu <div class="menu-wrapper"> <div class="menu"> <ul> <li><a href="index.html" class="active">Home</a></li> <li><a href="about.html">About Us</a></li> <li><a href="tutorials.html">Tutorials</a></li> <ul><li><a href="tutorials.html">Testing
draggable object is pushing divs out of the way instead of hovering over them
I have a draggable card. I have drop targets in a container div. If I drag the card over any other part of the page then then the card hovers over the page. If I try to hover the card over the drop box container it pushes it down the screen andrefuses to enter it. You can see it in action here: https://jqueryuiexperimentscratchpad-gedq.c9users.io/ Click on the card stack to generate a card. Why should a drag item refuse to enter one div but not another?
Use Ajax Object
I use a ajax in my js file. I want to use responseText to same js file. My code is : var colors = $.ajax({ url: "GetSession.php" }); console.log(colors.responseText); but it wont work! How I use from response text as a variable in the same js file?
no respond when click button to get json data from url in table
I have url www.DevuEgypt.com/api/employees i need to display FirstName,Id,Salary in table by click button using jquery when click button not give me any result and give me two message I try more time but it give me error submit handler has fired this is normal to check error error not found this message show to me my code as below [code] @{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <script src="~/Scripts/jquery-1.10.2.js"></script>
how to remove class from particular rows using jquery
Hi, I want to calculate difference and sum of values of text boxes using jquery following is my code $(".toCalculate1").keyup(function () { var td = $(this).closest('tr').children('td'); var sr = td.eq(1).text(); var total = 0; $(".toCalculate1").each(function (index, item) { temp = parseFloat($(item).val()); if (isNaN(temp)) temp = 0; total = temp - total;
Is this a Custom Date Picker?
Does anyone know how to create a datepicker as seen in the photo? You can book a time a month in advance. As each day passes, it automatically adds another day in the future. It does not include Saturdays or Sundays. I need it to be exactly like this. Thanks! Colin
Validate TextBox
Hi I want to Validate TextBox. I want it must have 1 Alphabet . No special Characters & Numeric Digit. Thanks
Scrolling in table
I try this grid please check link LINK now i successfully display this but there is no scroll <%--for grid--%> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"> </script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"> </script> <script type="text/javascript" src="Scripts/gridviewScroll.js"></script> <script type="text/javascript" src="Scripts/gridviewScroll.min.js"></script> CHECK IMAGE
Animate an image on hover
Hello, I am a total beginner, in fact I started with jQuery earlier today. What I am trying to make is an animation when the user hover on an image. What I want that will happen is that the image will animate out to the right, revealing som info behind it. When the user moves the cursor from the image, it should 'slide' back to cover the info again. This is my beginner code that I have struggled with for a few hours now. <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
Next Page