Get cumulative height
Hi Guys, I'm trying to get the cumulative height of li elements & set the parent ht, as it's being clipped. Tried: var outht = 0; var myli = $('#searcher_stack-its_outerhtml li[id^="order"]:visible'); var maincnt = $('#searcher_stack-its_outerhtml li[id^="order"]:visible').length; for (var mcnt = 0; mcnt<maincnt; mcnt++) { var fcnt = mcnt + 1; if ($(myli[mcnt]).css('clear') == "left") {outht = outht + $(myli[mcnt]).outerHeight(true)} console.log('Main Outer Height: ' + outht); if (fcnt
Call function after
Hi All, I have a function, imgCk() that needs to run after another function htFix() has finished w/ it's promise function. I tried this: function htFix() { $('div[class^="searchercustomcontent"]').promise().done(function() { ... }); } function imgCk() { $.when( htFix() ).done(function() { ... }); } I call out htFix(); & then imgCk(); in the code.When I look at the console imgCk() logs seem to be running first, instead of last. Thanks, Bill
Hi all
Hai everyone. I am new to this forum. You can also share your latest experience with us.
toggle div fails
If a visitor on my site selects a value in a selection box, I want it's corresponding div to be displayed. If the visitor selects an other value, I want to hide the old div and display the new div. The coding I have so far doesn't work properly.. the first and last select options don't display the div at all, and the second select option only flashes the div. I hope someone can help me out.. PS: The Option1, Option2 and Option3 values are being pulled from my db, but these values can have other names.
.data Method: Storing Class Attribute Values and Restoring Them
Total newbie to jQuery. I have a set of <span> elements, each of which has the @class attribute with multiple values. I have several functions that allow users to change the CSS of the <span> content in various ways. I want to provide a "Restore" button that sets every <span> element back to the @class settings it had when the page loaded. Here's the code I've got to this point: 1. Iterate over each <span> and store the @class value in the element's .data collection: $( document.body ).click(function()
Security with Jquery
Hi; How can I hide Jquery code from my html so hackers can't see the code? For example this code: <script type="text/javascript"> function view_more(id) { $.post('http://flatmates.com/more_ads/index'+id, { id: id, csrf_GCFEL: 'acc8b6cc5e1cac4d5e246bda2c065214'},function(output){$('#short_list').html(output).show();}); } </script>Thank you
Google calendar api
Hello, I am using Google calendar on my website and it is working fine. In this URL I included "max-results=10" which displays a maximum of 10 events on my website. Now I like to add "max 10 days from today" to it so it will not display events after 10 days. $.getJSON('http://www.google.com/calendar/feeds/' + 'mycalendar@gmail.com/' + 'public/full?' + 'orderby=starttime&' + 'sortorder=ascending&' + 'futureevents=true&' + 'max-results=10&' + 'singleevents=true&' + 'alt=json', Is this possible to
Simple question
Salaam all, I like some animations in this website :http://www.aquaceutic.pl/ and I try to do like them,I understand the jquery script for larger part of these animations ,but I don't know how to do the green bar that appears onLoad of the window and which moves from left to right and how they make it sloping like the background of the slide. It displays onload and then it hides since the load completes. I know.. it is a stupid question but I should ask :") ! and as I said I'm a beginner in jQuery
Pulling Weather from XML
Hello everyone, I am new to jQuery and I could really use some help. I am trying to pull weather data from aviationweather.gov Right now I am just using PHP to pull xml data, but the data is just basic and I need some more. I would like to pull METAR data so I found the following on the site. http://aviationweather.gov/adds/dataserver/metars/MetarExamples.php Looking at the first example on that page. How would I pull the data? I am confused because it doesn't generate an actual xml file does it?
first custom download -- full jquery in zip file (not compressed)
New to jquery and jquery-ui, I did my first custom download of jquery-ui. The web documentation indicates a compressed (min) version of jquery will be in the zip file, but it seems to be the full one. (two jquery-ui versions were in the zip file, both full and compressed) I downloaded 1.10.4, redmond theme, without any effects. Is this a bug? Since I'm new at this I hesitated to write a bug report before asking here.
Include link in youtube player jquery-1.8.2
Hello, I'd like to add videos coming from youtube or dailymotion ... on my current player: jquery-1.8.2 My player looks like this: http://www.leszappeurs.fr/zaps_basilic.php For now, I can only add videos hosted by me, it is avi, fly, etc ... For now, there are only mp3. <track> <location>http://www.leszappeurs.fr/emissions/mp3/basilic/les zappeurs - le basilic novembre 2013.mp3</location> <creator>Les Zappeurs</creator> <album></album> <title>Novembre
Why do I always get the last id when I do an alert..The first values are overridden by the last id of content close
$(document).ready(function(){ $('.content .part').hide(); var id='l'; var count=0; $('.content .close').each(function(){ var iden = id + count; $('.content .close').attr('id',iden); alert($('.content .close').attr('id')); count++; }); $('.content .close').click(function(){ alert($(this).find('h3').html()); alert($('.content .close').attr('id')); //I am always getting the last id "l3" }); });
Creating div and seeing real time text?
Hello, I'm trying to create a div ( which works ) and then add text to it in real time ( which doesn't ). my code: // this part works. $("#AddText").click(function() { if (!$('#TextArea').length){ $("#Area").append("<div id='TextArea'>test</div>"); } }); // however this isn't working, I can't seem to figure out why. $("#AddText").keypress(function() { if ($('#TextArea').length){ $("#TextArea").val(this.value); } }); any help would be great. thanks!
slowing .each iteration rate
Is there a way to slow the interation rate when using .each ? I would like to watch what is happening as it goes along.
randomizing: use id or img ?
An ajaxed-in page -- ajax.htm, occupying <div id="ajaxgoes here"></div> -- has a series of images, z-indexed, and set to "display:none": <img class="nun" id="#img1" src="folder/img1.png"> <img class="nun" id="#img1" src="folder/img1.png"> <img class="nun" id="#img1" src="folder/img1.png"> How to randomly show one of these images? something like showOne() { // var ids = [ '#img1', '#img2', '#img1' ]; // or // var imgs = [ 'img1.png', 'img2.png', 'img1.png' ]; / /$("??'+ ??[Math.floor(Math.random()
Garbage collector
Hi everyone. I am new to this forum. Can anyone tell me the usage of garbage collector in java
How to assign the return value of a function containing a getJSON() request to a variable?
I have actually been trying to figure this out for three days and it's driving me bonkers. I believe the answer lies in deferred objects or promises or something of that nature, but I've tried to implement several of these solutions (from several examples) and got various errors. This is what I want to achieve: function fn1() { $.getJSON("/path", function(results){ return results.a_key; // this is a string }); } my_var= fn1(); // i want this to equal the return value of fn1() alert(my_var);
Smooth Scrolling Problem
Hello, I'm having a problem implementing smooth scrolling on a page I am building. I have a header which contain links to different anchor targets within a div lower on the page. I have used this code to acquire the smooth scrolling transitions: $(document).ready(function() { function filterPath(string) { return string .replace(/^\//,'') .replace(/(index|default).[a-zA-Z]{3,4}$/,'') .replace(/\/$/,''); } $('a[href*=#]').each(function() { if ( (filterPath(location.pathname)
Action on selected name fails.
I've got a simple select box with some names in my html form. I want to show a div when 'Tom' is selected in the select box, but somehow it doesn't seem to work. Please note that I want to check the names, not the select values. $(document).ready(function() { $('#pgroup').change(function() { if ($('#pgroup option:selected').text() === 'Tom') { alert ("hi"); $(".complete").show(); } }); }); And my html: <select name="pgroup" style='width:150px;'> <option value=newboxes1>Jenny</option>
checking if submit was successful
Hey, I have an normal form and I want to send it out. I know how to use the validate stuff etc but since something can go wrong when you insert your stuff into a DB I want to check if it was actually successful. So I want to send the data and somehow receive if it was successful. Is there a way to echo the result in the processing php file and get the result in my form file? I hope you get what I mean. Best regards, snaper
Fade-based navigation - only works once for some reason
Hi guys, I'm using a simple function to fade between five divs based on clicking five corresponding divs. It works beautifully once - when I click one of the five navigation divs, the current content div fades out and the selected div fades right in. However, when clicking again, the current content div fades out and nothing fades back in. Seems that all five of the content divs end up with display set to none and won't fade back in. Any ideas would be greatly appreciated! Code below. <script type="text/javascript">
What Jquery and css reference do I need to make my popup window work?
Hi I'm trying to create a popup window. I noticed that many samples have ... script language="JavaScript1.2" src="css_js/jquery-ui-1.8.17.custom.min.js" ... On the page. I don't have access to this reference. Have JQuery 1.5.1.js and JQuery-ui-1.8.11.js. Do I need to upgrade my JQuery. If so how do I get the latest update? I'm using Microsoft al Web Developer 2010 Express and I though I had the latest JQuery by updating through the NuGet Package Manager. What do I need to make my popup window work.
Is this a Jquery lightbox set-up?
I work for a small company and we really like the look of this lightbox page. http://www.roguefitness.com/facility-outfitting/rogue-equipped-gyms/facility-gyms.php Is this something that a Magento Extension could do? If not, would this require a web developer to put together? Can anyone (you reading this) put this together? Any and all advice would help! Thanks in advance.
Why some Jqueries work and some don't?
Hi; I have a page with lots and lots of Jqueries but only some of them work! What I can tell is that Jquery is being loaded and accessible by the page. The page is HERE. For example when I click on <a id = "rubber"> (the RUBBER button), it should change the value of the text box above but it doesn't. It's in line 400 of my code: //Rubber $('#rubber').click(function() { $('#buttonStyle_DB').val('2'); }); Thanks for help.
reset value
code below worked great but when I switch back and forth between car 1 and 2 the value didn't reset. ok, here the problem... first select "One A" from car 1, hit submit, the values show below Form Fields: A=1 B=0 then select "One B" from car 2, hit submit, the values show below Form Fields: A=1 B=1 how can I reset the value of A=0 since the car 1 drop down is not visible at this time. Or can I just set the attribute for the hidden field to disable so it won't be pass to the next page? thanks
After downloading slider.....? Dreamweaver cs6 what do I do?!
I have dreamweaver cs6. I am trying to implement a simple slider into my webpage and would like to use jquery. I have installed from the download link on the homepage. My question is: When I chose a slider to use I download it, save it. Then when I go to input the files into my .js and .css folders I'm completely lost as to which files need to be put into my own. One slider I downloaded had 4 .js files and 4 .css files. This just can't be right. Apologize for being a n00b with javascript but I
ONLY Visible Div form elements will get submitted
It shows and hide when selection is made either City or State. Right now, when I hit submit button, both values (city and state) are carry to the next page. I only want one to be moved over when it's visible on the page but don't know how to do it, can you pls help? thanks function show_hide(show, hide) { document.getElementById(show).style.display="block"; document.getElementById(hide).style.display="none"; } <form action="next.cfm"> <input type="radio" name="select" value="1" onClick="show_hide('city',
Need to detect DataTable JQuery gridview Column Sort and Direction
Hi, I am using a gridview control, called DataTable, which is developed with JQuery which populate and provides sorting for ASP.NET gridview. When I export the gridview, I can't export the sorted columns and direction, since the JQuery does that functionality. From the c#, how can I detected the column click and sorted direction? Any help is appreciated. $(document).ready(function () { var oResultGrid = $("[id$='gvReportData']"); if (fixEmptyDataRow(oResultGrid))
Radio button value not being sent to server
This is a general question, thus no script. I'm looking for hints as to what could cause the following: Is there any reason that jQuery include scripts could prevent HTML radio button values from being sent to the server while all other values from selects and texts are correctly sent? When using straight HTML the radio values are sent. I get the same results in browsers IE8, FF 26 and Chrome 32.
loading multiple <DIV>s with content - some dont load at all
I've got a series of <DIV>s to contain report data (<TABLE>s), followed by the script to load each <DIV>. Each table generation is 5 to 30 seconds, so I was trying to get all the reports in parallel, rather than sequential calls. Some of the tables get loaded, but others never do, even though I can see the server is generating the html to return to the client. Am I running into a limit in javascript or maybe an error on some of the table results that wont load the result? Can I attach an error
jquery multipage template does not load google map properly if logo page is before map page
Hi, I am using a multipage template with one page displaying the google map which works fine as long as the map page is listed first. I decided to add a logo page before the map page and now the map is only a fraction of the size of the div container. Would anyone know why this is happening? Any help is greatly appreciated.
Changing a 'Default' state of a Menu on any given page
Hey guys. Brand new here and pretty new to the whole JQuery thing. I'm mostly a DBA and .NET developer but I'm learning as much as I can (and loving it) with JQuery. I have a question and hopefully it's clear and someone can help. I have created a custom Theme and downloaded the UI and am using it in a project. I used the "Start" theme and made a few color changes. The menu functionality is great and easy to use but what I'd like to do, as you see it commonly done, is change the default color
toggle
Hi, I want to have the toggle to call my new pop up page and passing id into this page so I an do my query to display all details. My code below isn't do what I want, can you pls help? <script> //toggle $(function(){ $('.myClass').hide(); $('.show').toggle(function(){ var showdiv = $(this).attr("id"); $('.' + showdiv).slideDown("fast"); $(this).attr("src","images/minus.jpg" ); },function(){ var showdiv = $(this).attr("id"); $('.' + showdiv).slideUp("fast");
Update table row using JQuery with textbox and I need to compare values for validating
This Function is not working pls some one help me $(document).ready(function () $('#btn').click(function (){ $('#ProductRecipt tbody').append("<tr><td class='code'>" + ItemCode + "<input type='hidden' name='ItemCode' value='" + ItemCode + "'/></td><td class='desc'>" + $('#Cat').val() + "<input type='hidden' name='ItemName' value='" + $('#Cat').val() + "'/></td><td class='qty'>" + $('#RFrom').val() + "<input type='hidden' name='ReceviedFrom' value='" + $('#RFrom').val() + "'/></td><td class='qty'>"
jQuery/AJAX - Can't get the correct selector
I'm looking for a little assistance, but mostly an explanation so I can avoid this issue in the future. I have a PHP script that is called using AJAX. The output of that script fills a div with an ID of 'schedule_wrapper_all' and is as follows: <div id="schedule_wrapper_all"> =====================GENERATED CODE====================== <div class="appointments"> <div class="appt" value="2"> <p class="c_name">William Davis</p> <div class="c_info" style="display: block;"> <p
Jquery mobile, load morris.js chart with onpage Html table data...
Hello, I am working on a MVC4 Jquery Mobile app and i am adding a bootstrap admin dashboard. I am trying to add a morris area-chart using data from a html table on the same page. I eventually want the table to display that data when the page loads. I have a javascript function that gets the data and converts it into a json object (JSON.stringify) in the correct format but the chart is not showing the data... I have the function hooked-up to a button_click event for testing. The sample code is
How to get a static json file across a domain
Hi, I am trying to get a static .json file using jsonp across domains. The sample I found, substituting my own url, follows. This does not seem to work as no alert with the data is shown even though a alert stating the function has been hit displays just previous to this code. I would appreciate any help.: $.getJSON("http://acaddb.hvcc.edu/~a-name/data/json/markers.json?callback=?", function (result) { //response data are now in the result variable
Use dynamic width of one div as the height of another div.
I'm currently trying to use var divAWidth = $('#divA').css('width'); $('#divB').css('height', divAWidth); If you have a look at http://wrestlingvoiceradio.com/2014 - I'm using Wordpress, but I want the height of #divB to be determined by the width of #divA, the CSS width value is 100% so it changes obviously, but I want to determine the current width and make that the height of #divB Cheers
moving jquery
i am new to html and wondering why i cant move jquery to a sub folder? i have the following... root index.html -lib jquery.js -img however when i use <script type="text/javascript" src="lib/jquery.js"></script>it wont work :( i have tried without type="text/javascript" aswell hope someone can shed some light :)
joining selectors
How would I join these two selectors?: a[rel="modal-profile"] and [id^=modal-profile]
Next Page