exercises together with arrows
Hello friends! I would make an educational website with exercises together with arrows. What I do is something like this but in html5 http://www.juegos.educ.ar/matematica/165-unir-con-flechas.html I'm a little lost and a little rusty with javascript. Anyone can help me to address this issue with jquery or any book that can help me with these concepts. thank you very much friends! PD: Sorry for my English.
Trouble using change() function with checkboxes
I'm having trouble getting this change function to work with checkboxes. What I'm trying to do is initially show "startTrendy" to all users, and then once they answer the question "personal_styles", "startTrendy" is hidden and "startClassic" is displayed unless they've picked either 'Trendy' or 'Modern'. A standard show/hide function isn't working here because they can select up to 3 values (there are 10 choices), and if any of their choices are 'Trendy' or 'Modern' then "startTrendy" needs to be
How can I simplify this
I am sure there is a easier or more pro way to write this. Would you let me know your suggestions? $("#rollovers li, #pro-desc div").each(function(){ var ListPos = $(this).index(); $(this).addClass('pos' + ListPos ) }); $(window).bind('resize', function(){ if ($(window).width() < 601) { $("#pro-desc div.pos0").insertAfter("#rollover-imgs
Disabling Copy Past in Webbrowser on Iphone
I have a button that should act like a momentary switch. Without any additional code it works fine in Chrome and Safari on my Ipad, in Chrome and Safari on my IMAC, but it does not work in Safari and Chrome on my Iphone. If I press the button for longer than one second or so, it says: Copy | Define So I need to disable the select & copy. I have added the code below in my .html file. In the header: <style type="text/css"> { -webkit-user-select: none; /* Disable selection/Copy of UIWebView */ } </style>
Highlight the equivalent of the selected element
Guys I'm trying to get the function below to highlight the equivalent in position of a selected element from ".intro-nav li" as shown below. Any Ideas on how I can achieve that. Thanks <script> $(function(){ if ( $(".faces:nth-of-type(1)").is("selected") $('.intro-nav li:nth-of-type(1)').addClass("selected"); } }); }); </script>
Help menu in jquery
Hello friends. I need help to do this effect in jquery, please: jsfiddle: http://jsfiddle.net/LDntf/2/ charl28.-
how can i creat class using Jquery
Im new at jquery script im trying to create a simple modal popup window this is my script can somebody help me? var box = function(h, w, content) { this.h = h; this.w = w; this.content = content; } $.extend(box.prototype, { showmybox: function() { if(popupStatus == 0){ $("#win").css({ display: 'block', width: w, height: h, left: ($(window).width()/2 - w /2), top: ($(window).height()/2 - h /2) }); $('#bb').addClass('modalOverlay'); $("#win").append(content).show(200); popupStatus
code.jquery.com/jquery-latest.min.js upgraded to 1.9?
It seems code.jquery.com/jquery-latest.min.js has been upgraded to 1.9 which had broken my site. I can't see any confirmation of this on the blog, or anywhere else. I have changed my site to use 1.8.3 now, but can anyone confirm 1.9 has been released?
URGENT!! function .live() dont' work
hello, i'm french sorry for my english to load the jquery plugin, i use this insruction :<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>. this instruction is use on thousand siteweb. since today, all my site bugs on the function .live(). why?? thank you very much
problems with my project's structure
hi, I want to create an object for the following situation: The object can include one or more stations. Every station can include one or more types. Every type can include one or more diagrams. This elements also should be objects. When I create the "master" object I want to define the following structure (example): 3 stations with the nams "Station1", "Station2" and "Station3" - Station1 should include 2 types -> "Typ1" and "Typ2" - Typ1 should include 3 diagramms - Typ2 should include 1 diagramm
Please help modify script that scrolls through a directory.
using PHP im reading directories and then displaying all the .pdf files within that directory. On the page being displayed is multiple directories shown at once. I have a script i borrowed then modified that allows scrolling through each directory. The issue is that it scrolls all the displayed folders. (i can see why it does it) and the counter counts all the elements. I need to modify so that the script is assigned to each directory element and calls only itself. I just dont know how to do
problem to call WCF service multiple times
Hi Guys, I need to get data thru WCF service, and it should happens in a cycle. Without cycle all good.. In the cycle, method ServiceSucceeded(msg, index); get executted twice which is perfect, BUT index always = 2 for (index = 0; index < 2; index++) { $.ajax({ type: "POST", url: webMethod, data: JSON.stringify(parameter), contentType: "application/json; charset=utf-8", dataType: "json", ProcessData: true, success: function (msg) {//On Successfull service call ServiceSucceeded(msg, index);
Change cursor to wait while loading a content, after, chage cursor to default when loading content is finished.
Hi all, as the tittle says, I want to change the mouse pointer to diferent images, something like: $('#searchFor').keypress(function(e) { code= (e.keyCode ? e.keyCode : e.which); var nombreServer = $('#searchFor').attr('value'); if (code == 13) { $(this).css('cursor','progress'); $('#muestraListadoServers').load('mostrarServer.php',{sname: nombreServer}); $(this).css('cursor','default'); } });Of course I know it doesn't work this way, but it is a graphic way to explain it. I tried for example:
jQuery menu onkey press - open menu
I created a jQuery script which would you require to press numpad0 and it would open up a menu. Pasting "jQuery('.panel_toggle').trigger('click');" works and brings up the menu yet having it in a fuction doesn't work. Also I must note that the console registers me pressing numpad0 so that works fine to. jQuery(document).ready(function() { jQuery(".panel_toggle").toggle(function() { jQuery('#panel_stats').stop().animate({'height':'415px'},500) },function() { jQuery('#panel_stats').stop().animate({'height':'0px'},500)
screen placement
I am trying to place an object in the middle height wise of an area of the screen. I thought this code would work to calculate the Y position of my object: var y = $chart.offset().top + $chart.outerHeight()/2; But the object is displaying about 60% from the top of the chart. Here are some actual numbers from the debugger: $chart.offset().top 367.79999923706055 $chart.outerHeight() 451 y 593.2999992370605What would be the correct way to do something like this?
jQuery not closing my popup on click
Hi All I am testing a Popup window using jQuery but I am not able close it. Can any one help me in closing this popup. This my HTML Code <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script> <script> $(document).ready(function() { //Put in the DIV id you want to display launchWindow('#dialog1'); //if close button is clicked $('.window #close').click(function () { $('#mask').hide(); $('.window').hide(); }); //if mask is clicked $('#mask').click(function () {
Accordion jquery
Help please. how to do that on page load automatically open the first unit? script <script type="text/javascript"> $(document).ready(function() { $('.showhide').click(function() { $('.showhide-all').slideUp(500); $('.showhide').removeClass('active'); $(this).next('div').filter(function(){return $(this).css('display')=='block'}).slideUp(500); $(this).next('div').filter(function(){ return $(this).css('display')=='none' }).slideDown(500).prev('div').addClass('active'); }); }); </script> hpml <style type="text/css">
help with horizontal scrolling content—I must have done something wrong...
Hi all, I thought it was a scathingly brilliant idea to update our client page with content that scrolls horizontally a la the tutorial found here, but for some reason it doesn't work. At all. I'm not sure where the fault lies other than with me somehow even though the jQuery is identical as far as I can tell. The CSS was modified to reflect as closely as possible to what was in the tutorial except that the tabs on the bottom are text links on the left. Could someone please take a look for me? I'm
jQuery .get() not working in IE9
I was recently informed that a routine I wrote is not working in IE. I know that it has worked for quite some time, so perhaps the issue is related to the newer version of IE. The code is: $(document).ready( function() { var aryRSS = new Array(5); $.get( 'slider_info.xml', function($xml) { var html = ""; var i = 1; $($xml).find('item').each( function() { var item_link = $(this).find('item_link').text(); // The three pieces of
Animate scrollTop to look like scrollLeft?
I've used jquery to write a vertical carousel feature. I'm using the .scrollTop() to set the scroll position to display the appropriate content, and I'm wondering if its possible to make the animation of scrollTop look like it's actually scrolling horizontally?
.resize() - callback not working
Can you tell me why jQuery("#some-ID").resize(alert("resized!")); is working, but jQuery("#some-ID").resize(function(){ alert("resized!"); }); isn't? thanks.
preventDefault(); not working on submit
Hello, I am new to using jQuery and can't seem to load data from another page without navigating to that page. My code is probably wrong somewhere so if someone could tell me what is wrong that'd be fantastic! Script I am using <script type="text/javascript"> /* attach a submit handler to the form */ $("#myform").submit(function(event) { /* stop form from submitting normally */ event.preventDefault(); /* get some values from elements on the page: */ var $form = $( this ), name = $form.find(
jFancyTile: A jQuery tile shifting image viewer plugin
im trying to tile shift the images. i tried running this plugin in Dreamweaver i followed the instructions i have included all the scripts typed the function out but for some reason its not working at all. if anyone can get this plugin working much appreciated, thanks. here's the site i got the plugin from, http://www.marcofolio.net/webdesign, This is the script in html i have in dreamweaver: <script type="text/javascript" src="file:///C|/Users/Amir/Desktop/js/jquery-1.8.3.min.js"></script> <script
Call a function when a input value is changes "not working"
Hi guys I have 2 input fields which contains dates. I have created a function to do some math work when the second input is change. here is what i have so far <script type="text/javascript"> function calculateTotal(){ var from = $("#from").val(); //ex. 20-2-2013 var to = $("#to").val(); //ex.25-2-2013 // end - start returns difference in milliseconds var diff = new Date(to - from); // get days var days = diff/1000/60/60/24;
Ajax Request Web Root
Hi, I'm using an ajax request to call a php script. Is it possible for the php script to reside outside of the web root? I don't think it is, my tests confirm but I'd like to know for sure. Than you in advance, Johnny.
Paste from excel
Hi I am trying to provide an easy import from excel feature to the user. They can copy paste some values from the excel template to the webinterface. However when excel has a multiline cell (I mean a cell with a break (or multiple) in it, not merged cells). Example: Col1 Col2 Test1 Res1 Test2 Res2a Res2b Test3 Res3 Test4 Res4a Res4b Res4c (The multiline can be an unknown amount of lines) I want
How can i do this?
I want to display a image on center and middle of the main page. When i display image the main page will disable, and when i close it, the main page return normal. Can any one give me the property or method to do this. Thanks so much.
How to caluclate the dates differanct?
Hi I am trying to calculate the date differance here it what i have done note how is the date format that i am using 20-2-2013 diff variable is displaying "Invalid Date " var from = $('#from').val(); //ex. 20-2-2013 var to = $('#to').val(); //ex.25-2-2013 // end - start returns difference in milliseconds var diff = new Date(to - from); console.log(diff); // get days var days = diff/1000/60/60/24; //ex.5
jQuery doesn't execute on div loaded with ajax !
I looked everywhere and everything I found did not help me! I have an HTML page that contains div is loaded via AJAX ..... when the content of the page is loaded directly javascript function as it should, but when the div that found in the content of another page loaded by AJAX, jquery not working on this div, while jquery scripts are already stored in the "head". Please, is there someone who can give me a script AJAX can function will with jQuery! and make pages load without recharging! Thank you
another .post issue
Hello, I have run into another issue with the $.post call. It does not seem to be returning any information. In the below code you will see that I am passing two variables through post to a separate php file. $("#myform").submit(function(event){ event.preventDefault(); var user = document.myform.userid.value; var pass = document.myform.password.value; $.post("vallog.php",{ username: user, password: pass}, function(data){ console.log(data.test); if(data.validate == "passed"){ passed(); } else{
hiding id value in autocomplete
The forum is complaining my post is too long so I will link to my question on stackoverflow http://stackoverflow.com/questions/14298030/hiding-id-value-in-jquery-autocomplete
Getting Offsetheight null or not an object while using Jquery tabs.
Hi Guys, I'm dealing with issue since yesterday and could not get ride of it.. Iam using jquey tabs. inone of them i' am calling <a href="content.cfm">Test</a> but this one is returning the following message : Message: 'offsetHeight' is null or not an object Line: 5 Char: 2386 Code: 0 URI: ../Tabs_example.cfm. I tried to get the value of that offsetheight and got '0' as value. in the cfm file i tried to remove all tables temporarly but still have the same issue.. So, if i change the value of the
autocomplete problem
Hi everybody! I'm trying to use autocomplete via php&mysql with multiple input. I used multiple:true parameter but nothing has happened... Can you tell me what to do? Here's an example of my code: var feature = $('#new_feature').clone(true); $('#new_feature').remove().removeAttr('id'); $('#add_new_feature').click(function() { $(feature).clone(true).appendTo('ul.new_features').fadeIn('slow').find("input[name*=new_feature_name]").focus(); return false; }); $('input[name*="options"]').each(function(index)
onClick li item in frame focus move on top
Hi, In my project I am calling ul and li data in Iframe and when I click on link then it move fucus on top instead of selected item. Following is the example of the problem. testFrame.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Tree Frame</title> </head> <body> <table width="50%" border="0">
Problem in posting data of dropdown input field
I am having following form with form.php <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="form.js"></script> </head> <? mysql_connect('localhost','root',''); mysql_select_db('test'); $query="SELECT * FROM user"; $result=mysql_query($query); ?> <div id="contact_form"> <form name="contact" action=""> <fieldset> <label for="txn_unit" id="txn_unit">Txn Unit</label> <SELECT name="namee" id="name"> <OPTION value="">SELECT</OPTION> <? while($row=mysql_fetch_assoc($result))
How to apply css to @html.dropdownlist
Hi Could you please let me know How to apply css to @Html.Dropdownlist. Thanks & Regards, Usha.
Twitter like update when new rows are added to the db
Hello, I have a page, the contents are gotten dynamically with php and I use a foreach loop to display all the content. <?php foreach($data as $key){ echo "<div id="post_content"> $post['post'] </div>"; } ?> They are also a lot of conditions in the foreach loop for example, if post was a shared post display this and that. Now I get my feed just as it is, but the problem here is, the page needs to be refreshed before you see new post rows from the database. This is where twitter
Setting css of inner html element
I have the following piece of code: <td class="myclass"><div class="tooltip">blablabla</div></td> On mouse-over of <td> I want to display the <div>. I've been trying it this way but it does not work: $('.myclass').bind('mouseover', function() { $(this).html().css('display', 'block'); }); $('.myclass').bind('mouseout', function() { $(this).html().css('display', 'none'); }); What is the correct way to achieve this? thanks
Jquery Checkbox with Images - Question
Hi all I have 3 checkboxes on my form each with a unique ID. When I click one, I change the image accordingly (using image replacement). I use the following code to mamage the click event of each checkbox: $("#support").live('click',function() { if(this.checked) { $(this).prev().attr("src", "/images/icons/tick-on.jpg"); } else { $(this).prev().attr("src", "/images/icons/tick-off.jpg"); } }); $("#services").live('click',function() {
Is it possible to address new HTML5 elements in legacy browsers?
$("section").each(function() { alert($(this).html()); }); This does not seem to work e.g. in IE8; $(this) seems to compute to null. Selectors do only seem to work when the UA actually added the element to the DOM. Is there a way to recognize unknown elements with jQuery, and perform operations on them? (This would be handy e.g. to replace a <section> by a <div>, or a <video> by an <object> with a flash player and so on.)
Next Page