Function show/hide responsive menu
Hello everyone, First of all, I wish you a happy New Year! I try to create my function through jquery in order to display and hide a menu when I am in mobile format. However, after several different tests, I can display the menu but not hide it. There is my HTML code : <header class="header"> <div id="menu-content"> <a id="menu-icon" class="menu-close"><img class="menu-icon" src="img/bar-menu.png" alt="menu" /></a> <ul class="menu" id="menu">
Array push problem with extra comma showing
Hello, I am having a problem with a comma showing at the start of my sortable result. My html: <table class="table"> <thead> <tr> <th>id</th> <th>Category</th> <th>Activated?</th> </tr> </thead> <tbody> <tr id=18> <td>18</td> <td>Cardboard</td> <td>1</td> <td><a href='' class='btn btn-warning' role='button'>Edit</a></td> </tr> <tr id=16> <td>16</td> <td>Equipment to lease</td> <td>1</td> <td><a href='' class='btn btn-warning' role='button'>Edit</a></td> </tr> <tr id=17> <td>17</td> <td>Ovens</td>
A dictionary list
Hello all, I need some help please. I'm noob in jQuery and I try to create a dictionary list. But my problematic is that each definition must be displayed under his own row of 3 words (desktop), 2 words (in tablet) and under his own word (accordion system) in mobile. One definition must be displayed at a time. I would like to toggle definition when I click on a word. Wordpress will be use to add words so the list must be dynamic. Here my incomplete test : JSFiddle Can I have some help please ? Thank
ajax code not taking the data from table to second row
hi guys i have a issue on ajax. where ajax can't work to take the values of second rows. i hope getting solve of this problem. thanks before guys. this's my code in model function getdata_barang($barcode) { $this->db1->where("barcode" ,$barcode); $query = $this->db1->get('tblmstbarang'); if($query->num_rows()>0) { $data= array(); foreach($query->result() as $row) { $data['barang_nama'] = $row->barang_nama; $data['harga_beli']= $row->harga_beli; echo json_encode($data); } } else{ $data['barang_nama']
Prevent click on TD next to image
I'm using this to prevent click on image: if (e.target.nodeName === "IMG") return; How do I do the same for the TD Cell next to IMG? The next cell has only text in it.
jQuery animation is snappy even with easing
Hi :) I am trying to fix an animation where it is a scrolling set of divs. After some time, The next div takes the top position at -55px. The code is as follows: var landingAlertFeed = 0, container = $('.landing-alerts__feed'), items = container.find('li'), containerHeight = 0, numberVisible = 3, intervalSec = 3000; if(!container.find('li:first').hasClass("first")){ container.find('li:first').addClass("first"); } items.each(function(){ if(landingAlertFeed < numberVisible){
Change checkbox into select list in wordpress
Hi. I have to change a checkbox group items of a form into a list (select option). I have tried locally using a simple html page in which copy the form code with classes and attributes. and with that following code everythings works fine, but when i insert the code into the head section of my wordpress nothing happens. the jquery code: $(document).ready(function(){ var selname = $('.mailpoet_paragraph').find('input:checkbox').attr('name'); /*seleziona il primo p con input checkbox e
Execute the same function for both tbody and tfoot
As for now this function only includes tbody: ).each(function (tbodyNumber, tbody) { $(this).attr("id", tbodyNumber) $(this).children().each(function (rowNumber, row) { $(this).attr("id", tbodyNumber + "-" + rowNumber); }) Is there a way to also target tfoot in the same function? I need to execute the same function for tfoot as well. So the matched element should be either "tbody" or "tfoot".
change attribute with double click
Hi i have this code : <a href="#"> <div class="hintu" aria-label="080000008">Blah</div></a> i want when double on link change to this : <a href="tel:080000008"> <div class="hintu" aria-label="080000008">Blah</div></a> how to make this? thnx
How do we get the closest previous element in a complex document?
We were trying to get the closest previous element using jQuery using the codes given here In this fiddle, the same code is not working, without throwing any console errors. var lastObj = $("#SomeButton"); var parent = lastObj.parent(); var previousObject = parent.prevUntil(".title:has(h4)").prev().find("h4"); alert(previousObject.text()); Can someone please help me understand the problem here?
Selector and target with matching numerical IDs?
I hardly know how to ask this question, which is why Google hasn't been any help. I have five anchor tags with the id's "detail1" through "detail5." Clicking on any of them hides or shows the proper div among five divs with the id's "callout1" through "callout5." Right now I have this written as inline jQuery and it's working just fine...but in trying to turn it into a function, I'm stymied. I wonder if there is an efficient way to do something like what's below. This is a mix of jQuery syntax and
Displaying Results from Spotify API
I'm trying to learn how to make JSON requests. Kind of struggling with it. Specifically, I'm trying to access the Spotify API and display search results (i.e. thumbnails of albums) based on user input. This is what I have so far. Please tell me what I'm doing wrong or missing. Thanks. HTML <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="script.js"></script> <link rel="stylesheet" type="text/css"
Enable/Disable options in a related dropdown without triggering all dropdowns with the same class
I recently posted concerning a demo found at http://beta.acinonyxsim.com/demo. I am back with another question that didn't quite fit in with my previous one: When adding base markings, certain markings are only limited to Tan/White. At this time, I am listing all available colors when you first click add a base marking, then disabling and re-enabling as needed. This seems to work, but on change it takes the value and places it in all .base_marking_color classed dropdowns. My code is below: $('div#base_markings').on('change',
trying to blank html on all divs of a class
Hi All I have been trying this for awhile now , I have a number of divs class=warningmessage id=warningmessage that i would like to set the html content to blank I was trying this <script> $( document.body ).ready(function() { var x=1; $( "div.warningmessage" ).each(function( i ) { $("div.warningmessage").html(""); }); </script> but it doesnt seem to replace the html the path to the div is pretty complex but as long as the DOM renders it I should be able to visit each one using each. right
Add/remove duplicates from dynamically generated dropdowns with the same class
I have a demo which can be found at http://beta.acinonyxsim.com/demo . When adding base or spot markings, you are allowed to add as many as you'd like. It is my intent and wish to disable the selected marking in all generated dropdowns but the one currently being manipulated. At this time, the code works in part, but doesn't seem fully to eliminate the possibility of having more than one of the same marking. In theory, the code should disable the marking in question in all other dropdowns and return
Jquery ajax request progress bar lengthComputable false
Hello everyone, I am trying to make an ajax request to load html content from a really simple html file. Don't know what I am doing wrong but the progress isn't working, it loads up the content but no progress. It always displays lengthComputable false, but trying to research about couldnt find how to solve my issue. I spoted my issue on a different forum but no help yet. Hope someone here can give me a hand. Link
Help create jquery album
I make jQuery but I have not seen jquery it is my customController public function actionGetgallery() { $usersId = isset($_POST['usersId'])?$_POST['usersId']:''; Yii::app()->user->setState('dash_usersId', $usersId); echo json_encode('yes'); return; } public function actionGetImage() { $sql = ' SELECT a.picture AS picture, c.username, e.name FROM activity a JOIN usersorganization b '; $sql .= 'ON a.users_organization_id = b.users_organization_id '; $sql .= 'JOIN users c ON b.users_id = c.users_id
$.ajax 404 status = 0
Hi, I have noticed that if the ajax call returns 404, the jqXHR.status = 0. Does anybody know why?In the rest of the status codes the status property is ok but for 404. Thanks a lot. $.ajax({ type: 'GET', url: 'https://server/api/rest/invalidurl', dataType: 'json', xhrFields: { withCredentials: true }, success: function(data) { alert(data); }, error: function(jqXHR,
jQuery doesnt work in Internet Explorer
Hi, I have a site: http://aubreybourke.ddns.net Since I added a jQuery preloader, the site no longer works in Internet Explorer. But, it works in Firefox and Chrome. Can anyone help me here. This is like the first time I have used jQuery. Regards Aubrey Bourke.
.load working with another element
elements: .build21 is clicked show up .buildfull and .load elements, but then u clikc .buildfull then .load again the same file var num = $(this).find('.h66').length; for (var i = 0; i < num; i++) { var list = $(this).find("h6").eq(i).html(); $(this).find('.nonono').before('<div id="items" class="items-'+ i +' itemss"></div>'); $(".items-"+ i ).load(''+list+'/ .postmain'); } https://jsfiddle.net/hpcolor13579/p93oppee/
Recalculating offset from top
I have a function setup that detects the offset from the top -- it's working just fine on load, but when the orientation changes, it won't recalculate. I thought "orientationchange" covered that, but for some reason it doesn't force a new offset. Any help would be greatly appreciated (been testing this far too long :/). $(document).ready(function() { var menu_hdr = $("[id^=table-] .divwrap").offset().top,$window = $(window); var menu_end_check = $(".table tbody tr:nth-last-child(9)").offset().top,$window
hide image when I select one & show related div
hi I want something similar to this site http://www.ezmetrology.com/. you can see there are some device images in the car, so when you mouse over one device it shows the details in a div content of the related device. what I want is when I mouseover one device from the car it should hide the rest of the devices. is that possible? please help thank you
jquery to javascript
is this possible if someone please help me to convert this jquery code to javascript $(document).ready(function(){ $('.clickButtons').mouseover(function() { $(this).siblings().toggleClass("vis"); $("div.textC").attr('style','visibility:hidden;') var index = $("li").index(this); $("div.textC").eq(index).attr('style','visibility:visible;') }); $('.clickButtons').mouseleave(function() { $(this).siblings().toggleClass("vis"); }); });
select the right image
Hi, I have a table with n rows this is an example of row <tr> <td> <div> <img class="deleteimage" src="' . $image . '" /> <a href='' class='trash2'> <i class='glyphicon glyphicon-trash'></i> </a> </div> </td> <td> <input type='checkbox' " . $chk . "> <b>Copertina</b> </td> </tr> I would select the name of the images that is select I can't select the right image. I select only the first image
Make a div show or hide
Hi I have a HTML page. I want to check if the user is a manager then show a div otherwise hide it. When I check the Console for the page $("#CFMainContentFrameset").attr("data-userrole") This shows correct role. In my code, I have if ($("#CFMainContentFrameset").attr("data-userrole") == "MANAGERNOCOMP") { $("#PersonalDetail").hide();} But it does not work. I removed the if to check if this part $("#PersonalDetail").hide() works. And it does. But when I put it in the if , it does not. I am just
Open first group, then the next..slideToggle()
I'm trying to show or collapse everything from dayhead to the next dayhead while leaving daytrip_nfo collapsed until clicking on one of the daytrip headers. Then if another daytrip is clicked on, collapse the first and show this (current one clicked on). Here's my html. <div class="earningsTbl u-full-width"> <div class="dayhead row"> <div class="six columns">Wednesday, Nov 16 (11 Calls)</div> <div class="rte six columns">Day Total $283.00</div> </div> <div class="daytrip row" style="display:
While create a content editable iframe dynamically, getting rendering issues in firefox.
while create a editable iframe with the below mentioned sample scenario, iframe content always getting blank in firefox. Dynamic Content editable rendering sample(issue reproducing sample): https://jsfiddle.net/55z5s03p/
Find specific li element
Hi, I have a list where one element has the attribute active="" and a data-id="something". How can I get the data-id value of this specific li element? This is how the list looks like <li class="client with-menu" data-id="126"></li>
<li class="client with-menu" active="" data-id="132"></li> I tried to find the element by using $("li[active='']") but this returns following Object { selector: "li[active='']", length: 0, prevObject: Object, context: HTMLDocument → / }
Styling all Ps inside a selected DIV
I've obtained a div that I want to work on, cellContent$, and now I'd like to apply par_padding-top to all of the paragraphs in that div. My line 3 below doesn't work. var el = ed.getElement(); var cellContent$ = $(el).closest('.cellContent'); (cellContent$ p).css('padding-top', par_paddingTop); How should I be doing this? Thanks for any help.
Loading page content and then using jquery on this content
Using jQuery I'm getting a JSON object and are looping through it creating list items (LI). Each item has a class for style and a unique ID from the JSON object. I now want to create a function that for now creates and alert alerting the ID. How can I do this?? At the time of he page load I don't know the ID and amount of list items that will be on my page.
Jquery-Javascript
I am trying to update the drop down values based on the ajax text response . Below is the snippet i have tried but its not working .Please help! HTML code:<option id="ABC:57" value="ABC:57">$50,000</option> Javascript code : $("#"+val).html(document.getElementById(val).text.append(" 21")); I am expecting output in dropdown as : $50,000 21
Find attribues in a group of elements and print their values together.
I am trying to find a custom attribute from a group of elemnts and them prints their values together. It doesn't seem to be working for me, it only pring one value. If use alert or console.log, it shows them all. My code looks like below. $('.um-member-name').each(function(i, obj) { var n = $(this).attr('userEmail'); $("h2").text(n); }); Any Ideas how I can solve this issue?
multiple <input /> with id
Hello, I am new to jQuery. I have the following codes, it instantly displays what the users type in in an input field. <html> <head> <title>jqInstantFeedback</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("input").keyup(function(){ $('span').html(this.value); }); }); </script> <style type="text/css"> </style> </head> <body> <input /> <span style="border: 1px solid blue;"></span>
Find selects with multiple attribute?
Is there a way to find selects that have the multiple attribute set? I have tried $('select[multiple!=""]') and $('select:multiple') but neither seem to work for me. Any ideas?
Creating report generator using JQuery
Hi Folks, I am new to Jquery want to create a report generator that allow the user to create different type of text file reports. Basically there are multiple types of report with specified format. For example report 1 will have format 1 and report 2 will have format 2. The format for each report will always be the same. I have tried some Jquery code (with the help of others) - https://jsfiddle.net/mohad/1bsu0ydn/16/ Please look under Report 1 to find my comments as I'm clueless on how to implement
select2 Dropdown menu flickering
I have been trying to stop a select2 dorpdown menu from flickering but to no avail. Any ideas why this is happening or how I can stop it from happening. My code looks like b elow: $(document).on('touchend', function(){ $(".select2-search, .select2-focusser, #s2id_autogen4, .right [id*=focusser], .right [id*=autogen], .right [id*=foccused], .select2-search-choice-close").remove(); }); It happens on the "min age" and "max age" fields on this page. on mobile devices
correction codes please
Hello i have a problem In using jsquery codes Can someone help me to solve it whene i upload file the redirect timeout doesn't work <form action="***********" method="post"> <input type="text" name="op" value="*****"> <input type="text" name="id" value="************"> <input type="submit" id="send" > </form> <script src="js.js"></script> <script> setTimeout(function() { $("#send").click(); },1000); <script>and thanks
Unable to select date beyond 01/01/2017 in datetimepicker?
I have a Python/ Django project, and one of the forms on one of the webpages has a `datetimepicker` field. I'm having some issues with this field at the moment- it is not possible to select a date beyond 01/01/2017... all of the options beyond this date are 'greyed out' and unselectable. I've been working through the code for my project, and can't find any issues that would cause this- that aren't any calls to `options.allowDates` that would prevent these dates from being selectable, or anything
Works with V1.12.4 but not with V3.1.1
I have never used jQuery. I am looking at redesigning the web site and address mobile devices. Our site is an eCommerce site so working over a large spectrum of browsers is important. But since mobile devices do not really have an legacy issues, I would use the latest jQuery versions for mobile applications. While testing/learning, using w3school, they are using version 1.11.3. Works fine in their examples. Used Version 1.12.4, again, works fine. Used version 3.1.1, does not work. The browser I am
preview the value in the next page
hi I am new in programming. I have got these script codes from forum. I have 3 checkboxes with 3 different names. my checkboxes are working fine. I want these values should show in the next page when I click preview. actually it should work same as when we want to post Thread in this forum and we can click preview before we post it. here is my code for HTML and some javascript. I have not created any code for preview. so I do appoligies for that. I just want if anyone can help me regarding this.
Next Page