Jump to content

Search the Community

Showing results for tags 'Jquery'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 282 results

  1. Admittedly I'm fairly new to Javascript, but I've taken numerous tutorials, classes, and have searched for hour online and I can't seem to figure out how to make my script work, and have edited it and edited it so many times I just want to start over. What I'm trying to do is, when one of six divs is clicked, a separate div will have 3 specific divs appear in it. Each of the original six divs have three similar but different divs related to it. I have this much, but as I've said I've looked through so many tutorials that I just scrapped loads.http://jsfiddle.net/petiteco24601/hgo8eqdq/ $(document).ready(function () {$(".talkbubble").mouseout(function(){$(".sidebar").show();});$$(".talkbubble").click(function(){$ How do I make it so that when you click a "talkbubble" div, a different "sidebar" div appears with all its contained elements, and when you mouseout, the first talkbubble div automatically activates?
  2. On home page [Website link] there is sliding celebrity Images : on click of any celebrity it takes to it resp. pages which is working on Desktop / laptop browser , i mean click - link working , but same if i open in Any Cell Phones then `sliding images` is shown but `images` is `not click able` and it not going to resp. page of celebrity.I am using `wp-roundabout-pro` ( https://wordpress.org/plugins/wp-roundabout-pro/ ) plugin in my website ( `WordPress 3.8.4` )i know the plugin is not support to current version of my word-press... but In Desktop / laptop browser all working prefect.any idea what is the issue. please help me out... as if this issue is not short-out then my whole work will be wasted Below is plugin code : <?php $anims = array('lazySusan', 'waterWheel', 'figure8', 'square', 'conveyorBeltLeft', 'conveyorBeltRight', 'diagonalRingLeft', 'diagonalRingRight', 'rollerCoaster', 'tearDrop', 'theJuggler', 'goodbyeCruelWorld'); if(!in_array($animation, $anims)){ $animation='conveyorBeltLeft'; $asclass = ''; } else { $asclass = 'class="hideflow"'; } $sid = 'rbt-'.uniqid(); $out = '<ul '.$asclass.' id="'.$sid.'">'; $fwidth = intval($data[opt1]); $fheight = intval($data[opt2]); while($row = mysql_fetch_assoc($res)){ if($row[url]!='' && trim($row[url])!=' '){ $img = '<img src="'.get_image_thumb($row[url], 'w='.$fwidth.'&h='.$fheight).'" />'; } else { $img = ''; } if($row[title]!='' && trim($row[title])!=' '){ //$ttlxz='<span class="rbt-title"><span>'.$row[title].'</span></span>'; $ttlxz=''; } else { $ttlxz=''; } if($row[desc]!='' && trim($row[desc])!=' '){ //$descxz='<span class="rbt-content"><span>'.$row[desc].'</span></span>'; $descxz=''; } else { $descxz=''; } $out = $out.'<li style="background-color:'.$row[color].'">'.$ttlxz.''.$descxz.'<a href='.$row[desc].'>'.$img.'</a></li>'; } $out = $out.'</ul> <style type="text/css"> #'.$sid.' { list-style: none; padding: 0; margin: 0 auto; width: '.$data[opt5].'px; height: '.$data[opt6].'px; } #'.$sid.' .roundabout-moveable-item { height: '.$fheight.'px; width: '.$fwidth.'px; background-color: '.$data[opt4].'; text-align: left; cursor: pointer; overflow:hidden; } </style> <script> jQuery(document).ready(function() { jQuery("#'.$sid.'").roundabout({ autoplay: '.$data[opt7].', autoplayDuration: '.$data[opt9].'000, minOpacity: '.$data[opt10].', maxOpacity: '.$data[opt11].', reflect: '.$data[opt12].', enableDrag: '.$data[opt13].', dragAxis:"'.$data[opt3].'", shape: "'.$animation.'", autoplayPauseOnHover: '.$data[opt8].' }); }); </script> '; ?> Sample of HTML code generated : <div class="slider"> <ul id="rbt-5428f4c10c934" class="hideflow roundabout-holder" style="padding: 0px; position: relative;"> <li style="background-color: rgb(238, 238, 238); position: absolute; left: 684px; top: 58px; width: 137.19px; height: 82.314px; opacity: 0.19; z-index: 117; font-size: 6.4px;" class="roundabout-moveable-item"> <a href="http://www.thefansworld.com/celebfanpage/shahrukh-khan/"> <img src="http://www.thefansworld.com/wp-content/plugins/wp-roundabout-pro/cache/w=300&h=180___Shahrukh-Khan-Magazine-Photoshoot.jpg"> </a> </li> </ul> </div> I taught my a link have some issue but my anchor link is seem to be perfect then why its not working in mobile phones. Also one user told me that on his/her mobile phone its working but i have checked in Samsung , Nokia , Sony ,Tabs all phones ..but its not working -- means image is not clickable ,where on desktop / laptop its working fine
  3. Dear All, I am working on project in asp.net and vb.net as code behind. The project needs to take a data from database and based on that data, I want to build orgchart(organization chart). so I decided to use third party control called as basic primitives. they have shown Jquery version of orgchart on their website. also they have provided primitive.js file which holds all the jquery classes which are required to build orgchart. but my problem is how to pass my data from database to these jquery classes for building orgchart note: I am using visual studio 2010 .
  4. I am trying to change the button text to Call Me when the browser window is 1024 pixels or LESS. The code below works fine until I add the if wi variable. Does anybody have any ideas for making this work? <button id="phone" class="button"><a href="tel:6144788011" title="Call Advanced Systems">614-478-8011</a></button> <!--- Begin Call Button Script ---> <script> var changeText = document.getElementById("phone"); var wi = document.width; if(wi <= 1024){ changeText.innerHTML = "Call Me"; } </script> <!--- End Call Button Script --->
  5. I am struggling from past 2 hours .Tried : location.reload(); reset form many features but after i close my popup and when reopen or open some another id ..my previous id data is still seen there and its continuous for all id. style : #overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; filter:alpha(opacity=70); -moz-opacity:0.7; -khtml-opacity: 0.7; opacity: 0.7; z-index: 100; display: none; } .content a{ text-decoration: none; } .popup{ width: 100%; margin: 0 auto; display: none; position: fixed; z-index: 101; } .content{ min-width: 800px; width: 900px; min-height: 150px; margin: 0px auto; background: #f3f3f3; position: relative; z-index: 103; padding: 10px; border-radius: 5px; box-shadow: 0 2px 5px #000; } .content p{ clear: both; color: #555555; text-align: justify; } .content p a{ color: #d91900; font-weight: bold; } .content .x{ float: right; height: 35px; left: 22px; position: relative; top: -25px; width: 34px; } .content .x:hover{ cursor: pointer; } Jquery / ajax :Below is my popup box + ajax to fetch and show record under Input field $('#class').on('click delegate mouseenter', 'a', function (e) { var data = dt.row( $(this).parents('tr') ).data(); var valuea = data[1]; $(function(){ e.preventDefault(); var table = $('#class').DataTable(); var overlay = $('<div id="overlay"></div>'); $('.close').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); location.reload(); resetForms(); $("span.ajax_loader").hide(); // success var pathlaser = "server_processing_laser.php"; tablel.clear(); tablel.draw(); tablel.ajax.url(pathlaser).load(); return false; }); $('.xclose').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); location.reload(); resetForms(); $("span.ajax_loader").hide(); // success var pathlaser = "server_processing_laser.php"; tablel.clear(); tablel.draw(); tablel.ajax.url(pathlaser).load(); return false; }); // POPUP BOX $('.click_'+data[0]+'').click(function(e){e.preventDefault(); overlay.show(); overlay.appendTo(document.body); $('.popup').show(); $("div.note_msg").hide(); $('.popup .id').val(valuea); // FETCHING DATA TO SHOW $.ajax({ type:"GET", url:"fetchrecord.php", data:{ valuea:valuea, }, async: false, success:function(html){ $("#display").after(html); } }); return false; }); }); }); }); **below is popup code :** <div class='popup'> <div class='content'> <a href='' class="xclose"><img src='../datatables/media/images/close.png' alt='quit' class='x' id='x' /> </a> <p> <form method="post" action="" id="feedback_form"> <div class="langtrx_fr" align="center"> <table align="center"> <div id="display"></div> </table> </div> </form> <span class="ajax_loader"></span> <table align="center"><tr><td> <a href='' class='close'><strong>Close</strong></a> </td></tr> </table> </p> </div> </div> fetchrecord.php $valuepktid = $_REQUEST['valuea']; $sql = "SELECT stoneone,stonetwo,stone3,loss FROM stone WHERE pid = ".db_escape($valuepktid)." GROUP BY id"; $resultpkt = mysqli_query($db,$sql); $abpkt = mysqli_fetch_array($resultpkt); ?> <?php header('Pragma: no-cache', true); header("Cache-Control: no-store, no-cache, must-revalidate", true); ?> <tr> <td class="label">Stone 1 :</td> <td class="form"> <input name="stoneone" id="stoneone" readonly value="<?php echo $abpkt['stoneone'];?>" class="stoneone" autocomplete="off" type="number"/> </td> </tr> <tr> <td class="label">Stone 2 :</td> <td class="form"><input name="stonetwo" readonly value="<?php echo $abpkt['stonetwo'];?>" class="stonetwo" autocomplete="off" type="number" /></td> </tr> <tr> <td class="label">Loss :</td> <td class="form"><input name="loss" readonly value="<?php echo $abpkt['loss'];?>" class="loss" value="" autocomplete="off" type="number" /></td> </tr> All is working fine.. i mean i am getting databut when i close and open any other ID , then popup show me above tr/td data twice.means the latest data and the old one which i closed.i tried reload of page so that i get fresh data, but some time its showing me proper data and some time multiple with old one.I think its something related to cache of DIV. which remain as its after close of popup.**popup link :** http://stackoverflow.com/questions/24902935/jquery-datatables-jquery-popup-box-not-working-under-function-php-mysqlany idea please help
  6. Hi all, I'm new in web languages and I need to know how to draw a bar which grow up to the left, now, my bar is growing up to the right and is no problem, but, now I need to invert the bar, and I don't know how...any ideas? I paste my code here: <!DOCTYPE html> <html> <head> <script src="jquery.min.js"></script> <script> var valor = 0; $(document).ready(function() { $("#btn1").click(function() { valor = parseFloat(document.getElementById("ejehorizontal").value) * 45.3; if (valor <= 453) { $("#box").animate({ width: valor + "px" }); } else { valor = 0; $("#box").animate({ width: valor + "px" }); } }); $("#btn2").click(function() { $("#box").animate({ width: "0px" }); }); }); </script> <style type="text/css"> body { } #fondo { background-image: url(FondoRiesgoLineal.jpg); height: 185px; width: 500px; margin: auto; } #box { height: 80px; position:absolute; margin-top: 47px; margin-left: 22px; width: 0px; background-color:orange; } </style> </head> <body style=""> <button id="btn1">Animate height</button> <button id="btn2">Reset height</button> <input id="ejehorizontal" type="text" value="" /> <div id="fondo"> <div id="box"></div> </div> </body> </html> thanks all
  7. Hello, I created a button and have a checkbox form. I want to add that form one by one everytime when the button is clicked, I have tried by clone() method, it worked but the checkbox didn't work, i mean i couldn't check in the box or it checks in all of the form. I need help. Here is peice of my code... <html> <button id="check-type">Multiple choice</button> <div class="multiple-choice"> <input id="check1" type="checkbox" name="check" value="check1"> <label for="check1">ques1</label><br> <br> <input id="check2" type="checkbox" name="check" value="check2"> <label for="check2">ques2</label><br><br> </div> </html> <script> $('#check-type').click(function(){ $('.multiple-choice').show(); //shows only once, but i want to add this form everytime when the button is clicked. }); </script>
  8. I'm trying to load an xml file into an html file using jquery... i'm using jquery bc the site is built in Adobe's Business Catalyst and doesnt allow for any server-side scripting languages. The XML fIle is broken down into five sections - Corporation Builder Subdivision Plan and Spec- with child nodes within themThe following node names are in the following format (Parent Child). The data that I am trying to display are the: "Builder BrandName", "Spec SpecStreet1", "Spec SpecPrice", "Subdivision SubParentName", "Plan Description", "Spec SpecElevationImage", "Spec SpecBedrooms", "Spec SpecBaths", "Spec SpecSqft", "Spec SpecGarage"So far I've managed to .find and .append all the information in the correct format within its appropriate div with one exception - The data is being repeated around 78 times. Where there should only be one version of each address. So my question is:What can i do to continue displaying the data on my page (http://www.fallsatimperialoaks.com/home-inventory/index_copy.html) without having the data repeated?The XML File is located at http://www.fallsatimperialoaks.com/I8959.xml <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type:"GET", url:"/I8959.xml", dataType:"xml", success: function(data){ $('#load').fadeOut(); $(data).find("Builder").each(function(){ var Brandname = $(this).find("BrandName").text(); var Subdivision = $(this).find("Subdivision SubParentName").text(); $(data).find("Plan").each(function(){ var Description = $(this).find("Description").text(); $(data).find("Spec").each(function(){ var Address = $(this).find("Spec SpecStreet1").text(); var Price = $(this).find("Spec SpecPrice").text(); var Image = $(this).find("Spec SpecElevationImage").text() + '" width="220" height="124" alt="' + $(this).find("Spec SpecStreet1").text(); var Beds = $(this).find("Spec SpecBedrooms").text(); var Baths = $(this).find("Spec SpecBaths").text(); var Sqft = $(this).find("Spec SpecSqft").text(); var Garage = $(this).find("Spec SpecGarage").text();//Append to homecontainer $("#homecontainer").append(' <div class="address"> ' + Address + ' <br><span>Section: ' + Subdivision + '</span>' + '</div>' + ' <div class="price"> $' + Price + ' <br><span> ' + Brandname + ' </span>' + '</div>' + '<div class="clearboth"></div>' + ' <div class="home-image"><img src="' + Image + '"/>' +'</div>' + ' <div class="home-description"> ' + Description + '</div>' + '<div class="clearboth"></div>'); $("#homecontainer").append(' <div class="stats"><div class="beds"><img alt="" src="/images/ico-beds.png" style="border: 0px; width:22px;" /> ' + Beds + ' Bedroom(s)</div><div class="baths"><img alt="" src="/images/ico-baths.png" style="border: 0px; width:22px;" /> ' + Baths + ' Bath(s)</div><div class="sqft"><img alt="" src="/images/ico-sqft.png" style="border: 0px; width:22px;" /> ' + Sqft + ' Sq. Ft.</div><div class="garage"><img alt="" src="/images/ico-garage.png" style="border: 0px; width:22px;" /> ' + Garage + ' Car Garage</div></div>'); }); //End Data Function "Spec" }); //End Data Function "Plan" }); //End Data Function "Builder" }, error:function(){ $("#homecontainer").text('Failed to get feed'); } });}); </script> Any help is appreciated! 
  9. I wanted to make a star rating system but my code is not working. Can anyone help me please? i couldn't figure out why the star is not changing while hover it. 1.0-star.png is white while 0.5-star.png is golden. Thanks. Here is the code.. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> function setRating(number){ jquery('#main').css('background', 'url(images/'+number+'-star.png) no-repeat') } function saveRating(number){ jquery('.rating').attr('onmouseout','setRating(''+number+'')'); alert(number); } </script> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="main" style="background:url(images/1.0-star.png) no-repeat;"> <div class="rating" onmouseover="setRating('0.5')" onclick="saveRating('0.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('1.0')" onclick="saveRating('1.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('1.5')" onclick="saveRating('1.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('2.0')" onclick="saveRating('2.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('2.5')" onclick="saveRating('2.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('3.0')" onclick="saveRating('3.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('3.5')" onclick="saveRating('3.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('4.0')" onclick="saveRating('4.0');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('4.5')" onclick="saveRating('4.5');" onmouseout="setRating('1.0')"></div> <div class="rating" onmouseover="setRating('5.0')" onclick="saveRating('5.0');" onmouseout="setRating('1.0')"></div> </div> </body> </html>
  10. i'm trying to work with jquery autocomplete using 'jquery.js' & 'jquery.autocomplete.js'. everything is working fine. but when i press 'Enter' after selecting one of the results it gives, i cant find where the pointer reaches. what i expect it is if i press 'Enter' then i want it to select (or focus) that same or next input field. in jquery.autocomplete.js file there is something written for the 'Enter' button $input .keydown(function(e) { // track last key pressed lastKeyPressCode = e.keyCode; switch(e.keyCode) {// ................// ................ case 13: // return if( selectCurrent() ){ // make sure to blur off the current field $input.get(0).blur(); e.preventDefault(); } break;// ................// ................ } }) but i cant understand what it is doing and what to change to make it do what i expect. can anybody please guide...????? thanks in advance...
  11. hi, i have a pop up window i have written my whole codes below. i have dynamic div tags structure. if i clicked any an char tag link in a parent window, it opens a child window.it has two form fields like text box and button. if a user add text into text box of child window and click button, the value should be added into parent window textbox value near to already clicked an char link. how do i do that. this is my JavaScript in parent window parent.html function opn_wind_par_fing(clicked_id){ window.open("child3-find.html","Open new window","width=550,height=170,left=150,top=200,toolbar=1,status=1,"); window.buttonid = clicked_id;} this is my HTML in parent window parent.html <form method=post action='' ><div id="main"><a href="javascript:void(0);" id="my_id-0" name="sho-name" onclick="opn_wind_par_fing(this.id);">click</a><div><input type="textbox" id="my-input-0" class="input-class" value=""/></div></div><div id="main"><a href="javascript:void(0);" id="my_id-1" onclick="opn_wind_par_fing(this.id);">click</a><div><input type="textbox" id="my-input-1" class="input-class"value="" /></div></div><div id="main"><a href="javascript:void(0);" id="my_id-2" onclick="opn_wind_par_fing(this.id);">click</a><div><input type="textbox" id="my-input-2" class="input-class" value=""/></div></div></form> it is my JavaScript in child window child3-find.html $(document).ready(function(){ $('#my_btn').click(function(e){ e.preventDefault(); var input_value = $("#txt_field").val(); var clicked_elem_id = window.opener.buttonid; $('#'+clicked_elem_id).next().$(window.opener.document).find('.input-class').input_value; window.close(); });}); my HTML in child window child3-find.html <form method="post" action="">Your name<input type="text" id="txt_field" size=12 value="test"><input type="button" id="my_btn" value="Send"></form>
  12. i'm trying to append some elements with some conditions <script type="text/javascript">function appending() { if ($('#ac_type').value == "Debtors") { $("#append").append( "<p>Test Append Element</p>" ); }}</script> i take value for the if condition and append onBlur from this -- <select name="ac_type" id="ac_type" onkeypress="return tabE(this,event)" onBlur="appending()" /> <option></option> <?php $query = "SELECT * FROM ac_type"; $result = mysqli_query($connect, $query) or die("Unable to select database: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result)) { echo "<option>" . $row['ac_type'] . "</option>"; } ?> </select> i append the element here-- <tr valign="top"> <td colspan="2"><div id="append"></div></td> </tr> but its not working with the defined condition. but if i remove the condition [ if ($('#ac_type').value == "Debtors") { ] it works...... please guide where i did wrong....
  13. I have 4 Column ( id (primary) , a, b ,c ,d ) --------------------------------------------------------------------------------------------------------------------------------ID | A | B | C ( where C = SUM B ) | D ( where D = C / A1 , Where A1 = 6 )-------------------------------------------------------------------------------|------------------------------------------------1 | 4 | 3 | 8 | 22 | 6 | 2 | | 3 | 1 | 3 | | -------------------------------------------------------------------------------|-------------------------------------------------- How i can display such table with pagination . Both A , B value are Input text Field , which entry are made by user side and its stored in Database table , but C value is addition of B (TOTAL) . where C = SUM B where D = C / A1 , Where A1 = 6 HENCE how i can get C,D as A,B coloumn get increment , and c,d will be calculation of it , hence how i can show such TABLE VIEW with Pagination . note : Not tried any thing , as i am bit confuse how to start
  14. Anyone got some useful idea how to create a div and give it an X on the top right corner, so if user clicks on it, it will fold away with jquery. Should i just create another div within the main one and position it?? It sound too cheap to me, anyone got a better idea? Thanks
  15. the following script to ask for confirmation before submitting a form is not working while clicking yes. please guide me find the error... <script>$(function () { 'use strict'; function confirmDialog(title, message, success) { var confirmdialog = $('<div></div>').appendTo('body') .html('<div><h6>' + message + '</h6></div>') .dialog({ modal: true, title: title, zIndex: 10000, autoOpen: false, width: 'auto', resizable: false, buttons: { Yes: function () { success(); $(this).dialog("close"); }, No: function () { $(this).dialog("close"); } }, close: function() { $(this).remove(); } }); return confirmdialog.dialog("open"); } $('form').on('submit', function (e) { e.preventDefault(); var form = this; confirmDialog('Confirm', 'Are you sure?', function () { form.submit(); }); });});</script>
  16. i learnt how to update single mysql row using jquery and ajax. now i want to learn how can i update multiple rows the same way. this was done to update one row -- var where_val = form.find('#where').val(); var where_col = form.find('#where').attr('name'); input.bind('blur', function(event) { var value = input.val(); $.ajax({ url: action, type: method, data: { val: value, col: column, w_col: where_col, w_val: where_val, }, to try if it works or not for updating multiple rows, i changed this to -- var where_val = form.find('#where').val(); var where_col = form.find('#where').attr('name'); var where1_val = form.find('#where1').val(); var where1_col = form.find('#where1').attr('name'); input.bind('blur', function(event) { var value = input.val(); $.ajax({ url: action, type: method, data: { val: value, col: column, w_col: where_col, w_val: where_val, w1_col: where1_col, w1_val: where1_val }, but somehow its not working. it is updating all the rows with the values of the last row. please guide me...
  17. I'm trying to make this page working that has a vertical line of pictures (thumbnail-sized) which you can then click on to make them scroll to full width and show lots of text and happy stuff. I've already managed to do all that. However, if I click on one thumbnail, any open thumbnails are supposed to close. I've implemented an IF statement and class-checking for that: $("a#shins-rec1").clickToggle( function(){ if ($(".shins-rec").hasClass('done')) { $(".shins-rec").filter($(".done").not($(this))).animate({ left: $(".shins-rec").filter($(".done").not($(this))).width() / 2 - 60, width: '120px' }, 250, function(){ $(this).removeClass('done'); }); } else { $(this).parent().animate({ left: 0, width:'100%' }, 250, function(){ $(this).addClass('done') }); }; }, function(){ $(this).parent().animate({ left: $(this).parent().width() / 2 - 60, width: '120px' }, 250, function(){ $(this).removeClass('done') }); // even clicks }); which works all fine, but after you clicked two or three times on different thumbnails to open them and close the other ones, the already open thumbnail gets stuck and the clicked thumbnail opens as it should open. You have to click on the clicked thumbnail to close the other one, and then you have to wait some time till you can click the clicked thumbnail to properly close it again. After that it just stays like this. I've already tried doing it with a plugin called Summer of GOTO, because I think it has something to do with checking whether there are any "done" classes or not, so I wanted to make it re-check stuff using goto in JQuery. Using a WHILE statement didn't work either, but that could be because I don't understand that function.I tried adding .stop() before the .animate statement, but that didn't do anything special as well. Anyone knows how to solve this? Thanks in advance. Here is a JSfiddle of what I'm working on.
  18. i'm trying to learn jquery. while learning i'm trying autosuggest and i tried this <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("item.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); }</script> it is working properly... but i wish the suggestion could be selected using up and down arrows on keyboard. can anyone suggest how can i do that?
  19. help me if you have any idea i am new in development field, pls any one....
  20. i have the following html and javascript, how can i shorten the javascript ? html and javascript at - http://jsfiddle.net/GZhvM/2/
  21. I have downloaded several WordPress plugins for text expansion. However, none of them seem to have the one feature I need.I need to be able to click a link to expand the text, but when you click a different link, it closes the previous one as well... Are there any ways to do this? I don't know very much jquery, but this seems to be the favorable way to do it... Can anyone hold my hand a little here?http://beta.cleantelligent.com/benefits-test-mobility is the page with the current expander plugin activated. I'm currently using one called Expand +Collapse Funk.Any help here would be fantastic! Thanks!
  22. I'm doing a project for a client and the Financial Adviser's in the company needed to be able to visit a page and create a report on the fly: Visit a webpage and be able to create a report based on a question form, This is an example of the report. Client's Name: (Name is entered) This name will be replicated throughought the report as well as other information (this is just a quick exmaple). First Question: "what are you serving the client?" Answers: "Pension", "Investment", "Mortgage", "Protection" Based on the answer a set of questions will appear below relevent to each answer. For example if the Advisor choose Investment then the following question would be (as an example) "What is the clients attitude toward risk managment?" Answers "Incliened to take high risks", "Inclined to take some risks", "Not very inclined to take risks" Based on this a paragraph related to the question would appear in the report which is being created below. Then another question (also which appeared based on the answer Investment) would of appeared This question would also have the same functionality as the one above, Essentially what i am trying to achive is create a report which is created on the fly based on a form and a pool of questions (prefably not stored ina database to keep it simple) related to each answer, then copy the report from the website to a word document. As you can see i have tried to be as descriptive as possible with what i am trying to achive, I have little knowledge of Javascript/Jquery, I would be greatful if you could point me in the right direction by telling me what i need to do or any good tutorials. What would be amazing is if someone kind person could create a simple framework for this page in which i can develop further. Thanks Ieuan.
  23. Code pen link What I want:To fade our image, overlay text. Problem: It kind of does what I want but when you leave your mouse over the image, it goes through fade in / fade out loop.
  24. Hi everyone, I am facing a crisis here. I have a textbox, named businessInfo_businessAddress, which contains client's address loaded from the database when the page is loaded. I have a hidden field, named tracking-select-business-country-code <input type="hidden" id="tracking-select-business-country-code" value=""/> which is supposed to store the country code after the google map api is called. In the included javascript file, where the google map api is called, I have piece of code like this function getCountryCode(targetAddress){ console.log("in function getCountryCode"); var input = document.getElementById(targetAddress); var autocomplete = new google.maps.places.Autocomplete(input); console.log("autocomplete: "); console.log(autocomplete); var lat = "37.09024"; var lng = "-95.71289100000001"; console.log("before calling google map api"); google.maps.event.addListener(document, 'load', function () { console.log("after calling google map api"); var place = autocomplete.getPlace(); if (!place.geometry) { return; } lat = place.geometry.location.lat(); lng = place.geometry.location.lng(); var address_components = place.address_components; console.log("address components: "); console.log(address_components); var country_code; for(var i=0; i< address_components.length; i++) { var address_component = address_components[i]; if((typeof address_component !== "undefined") && (typeof address_component.types !== "undefined")){ if(address_component.types[0] == "country") { country_code = address_component.short_name; } } } country_code = $.trim(country_code); console.log("country code:'" + country_code + "'"); $('#tracking-select-business-country-code').val(country_code); }); }function _webGetCountryCode(){ console.log("in function _webGetCountryCode"); getCountryCode("businessInfo_businessAddress");} And in document.ready I have a piece of code that trying to call that function like this <script> $(document).ready(function () { var oldAddress = $("#businessInfo_businessAddress").val(); $('#tracking-select-address').val(oldAddress); var country_code = $("#tracking-select-business-country-code").val(); if(country_code == "" || country_code == null) { console.log("country code is empty"); google.maps.event.addDomListener($("#businessInfo_businessAddress"), 'focus', _webGetCountryCode); $("#businessInfo_businessAddress").focus(); getCountryCode(); } var country_code = $("#tracking-select-business-country-code").val(); console.log("country code (when loaded): " + country_code); ............... </script> I got this error in console.log Uncaught TypeError: Cannot read property 'value' of null I guess it must have something to do with variable autocomplete (just guessing). Anyway, what I need is that after the form finishes loading (ie. $(document).ready is called), google map api must be called with the value contained in the textbox businessInfo_businessAddress (for example: "Atlanta, GA, United States") and return the country code for hidden field tracking-select-business-country-code. I wonder how can I do that? Any idea? What change do I need to make in the code? Please help!!!! Thanks everyone.
  25. i want to know if jquery (or javascript) can deal with mysql database?
×
×
  • Create New...