Why is my function excuted much later
Hi everybody, this is my first question here, so please be gentle... I'm just building my first web app using jQTouch (which itself is a jQuery extension, if I got it right). So, I have quite a lot of code up and running, doing exactly the things I want them to do BUT... I have created one object "einstellungenObject" with a function called "getEinstellungen", which is supposed to load the user's configuration from a SQLite table. That is working but this function is executed in a way I don't understand.
Countdown / session remainig indicator
Hi... Can anyone recommend an example / tutorial for a graphical countdown or time / session remaining indicator? Can jQuery do this sort of thing? Thanks...
Toggle reset
I am creating a checklist and have placed all the bullet points in a table. I also have a button after the table that sets the html of the checkboxes to a space - I would like this check box to reset the click counter of the check boxes, how can I do that? Here is the code for the scripts. <SCRIPT LANGUAGE="javascript"> $(document).ready(function(){ $(".chk").toggle(function() { $(this).html('✔'); }, function() { $(this).html(' '); } ); }); </SCRIPT>
Keep the 'accordion' menu open
Hay, I've got an question about a 'accordion menu', When I add a 'current' class to my list item, <ul id="TEST"> <li><a href="#">Example 1</a> <ul> <li><a href="#">Example 1.1</a></li> <li><a href="#">Example 1.2</a></li> </ul></li> <li><a href="#">Example 2</a> <ul> <li><a href="#">Example 2.1</a></li> <li class="current"><a href="#">Example 2.2</a></li> </ul></li> </ul> I'd like the the 'current' menu item stays open on the new page. What line of code do I have to add in
Why html element created on fly is unable to use appendTo method ?
Please view this code: <script type="text/javascript"> $(function(){ $("<p>Hi all</p>").appendTo($("p img")) }) </script>I am just trying to add a newly created P element to another P element that contains images with the help of appendTo() method. But i am getting this error: Unexpected call to method or property access. Can you please tell me why this is happening ? It is against the documentation in jQuery official web site.As you can see it is clearly written there: With .appendTo(), on the
Fill a bubble with the HTML of a hidden div
Hi, I'm quite new to the jquery and javascript stuff. I used the "CreateBubblePopup", filling it with html directly in javascript. Until now, it was working fine. For some reasons, now I need to write this HTML inside the page (in a hidden div), and then load this html inside the bubble when it's created. Here is the code : HTML : <a class="bubble" href="..." > <img alt="Détail" src="plus.png" /> <div class="hidden">Here is the HTML that will be displayed in the bubble.</div> </a> Javascript : $(".bubble").each(function(){
Not able to do more than one thing with jquery datepicker
Hi everyone, I'm new to jQuery, and it seems like an amazing tool once I figure out what I'm doing wrong. I'm using the awesome datePicker plugin, but am just not getting something right. I can't seem to be able to get datepicker to do more than one thing. To help myself figure out what Im doing wrong, I created a very simple example: <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css" type="text/css" media="all" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"
Textarea value selection
Hello, i have multiple divs like this one: <div class='container'> <textarea class='message'></textarea> <input type='button' class='button_class' value='Post' /> </div>what im trying to do is to get the textarea.message value everytime i click on .button_class ... the problem is that i have multiple textareas so i
background-repeat
I'm writing a basic code where i'm trying to correct the background of my site that is in PNG with the filter from Microsoft to correct the error. Unfortunately Internet Explorer has only two methods that are good for use. The scale and the crop. I was wondering if anyone has a technique to make that supports background-repeat using jQuery? I spent three days trying to find or create some method, but nonewere successful.
jQuery glossary
Any help would be much appreciated, I've got a glossary function that I need to extend. Currently I add terms and definitions to a div inside my html page. The jQuery function retrieves these as $term and $definition. It then loops through a named ID of a content div to match any instance of my terms and then replace the html to show a tool tip with Term and definition. What I'd really like to achieve is to find the only the first instance of my 'term' in the content div and apply the tip to that
I realy need a little help with :checked Selector
Hi, I use this code http://api.jquery.com/checked-selector/ for show checked fields... But I now need to result be in numbers of squares.. For example if you check 3 checkboxes you will get in result bellow 3 squares..I think to resolve squares with ul li elements, but to to this with jquery I have no idea how :) Can you please help me?
selecting / basic problem
Hi everyone, This is a rather simple problem, but I can't seem to get it to work. I have the following structure: <div> <div class=a></div> <div class=b></div> <div class=c></div> <div class=d></div> </div> <div> <div class=a></div> <div class=b></div> <div class=c></div> <div class=d></div> </div> This repeats 22 times (for different areas that can be clicked) When each div C is clicked (as all the other divs are layered) I have an ajax output that
Multiple forms
how todo a mutliple form with this function: $(function() { $('.error').hide(); $(".button").click(function() { $('.error').hide(); var name = $("input#name").val(); if (name == "") { $("label#name_error").show(); $("input#name").focus(); return false; } var dataString = 'name='+ name; $.ajax({ type: "POST", url: "/mailer.php", data: dataString, success: function() { $('#contact_form').html("<div id='message'></div>"); $('#message').html("<h2>Contact Form Submitted!</h2>") .append("<p>We will be
Will jquery-1.5-vsdoc.js work in Visual Studio 2008 or only in VS 2010?
Good morning. Will jquery-1.5-vsdoc.js work in Visual Studio 2008 or only in VS 2010? Is there anything special that needs to be done to use it in VS 2008? Thank you, WheelsGuy
the first day i saw the jquery!
hello guys,i fall in love in the fist time,thank you, i come from China.
Counting and adding table rows.
Hello... Is it possible for jQuery to count the number of rows in a table and then add some more if there is less than a defined amount? So that this table with less than 10 rows..... <table class="testTable"> <tr> <td>Foo...</td><td>Foo...</td><td>Foo...</td> </tr> </table> Becomes this... <table class="testTable"> <tr> <td>Foo...</td><td>Foo...</td><td>Foo...</td> </tr> <!--added by jQuery --> <tr> <td>...bar</td><td>...bar</td><td>...bar</td>
Selecting Javascript array elements?
Sure that I'm doing something really dumb. But I'm trying to add the text of a textarea form to the string that's contained at: myarray[a][b][c] It was easy to pull out the value of the textarea with this: textinput = $('#mytextarea').val(); But then when I try to add the variable into the array, it doesn't work. I'm not able (apparently) to do this. Fingers crossed that I'm doing something dumb? This doesn't work: myarray[a][b][c] += newstringvariable; Nor this: myarray[a][b][c] = myarray[a][b][c]
How to get dates from a server
I am writing an ASP.Net MVC application and I want to extract the bank holiday dates from the SQL database and use that to disable dates in my Jquery date picker. -------------------------------------------------------------------------------------------------------- So the Controller looks like this; [HttpGet] public ActionResult Get() { return BankHolidayViewModel.GetAllBankHolidays(); } ---------------------------------------------------------------------------------------------------------
How do I get position left of a hidden element?
I know how to get position left - var posLeft = parseInt($('.class').position().left); But the class I am using has the style display:none; Is there a way around this? Why doesn't this work? var posLeft = parseInt($('.class').css('left').replace("px", ""));
simple animating question
I got everything I want to work. But I'm pondering why right when the page loads, and u hover over an image, my animation doesn't run for the very first time you hover over it. After the first hover it works just fine. i uploaded it... http://dl.dropbox.com/u/9883217/hover/index.html
How to change Save and Cancel Button
hello, i'm use the fckeditor by an littel project by myself. how to change save an cancel button as the two buttons on the left side such as *.png i figure this out this reslut the code <script type="text/javascript"> ////set all the FCKeditor configuration here and pass it to the editable var oFCKeditor = new FCKeditor( 'edit-menge') ; oFCKeditor.Config['ToolbarStartExpanded'] = false; oFCKeditor.Width = 80; oFCKeditor.Height = 50; oFCKeditor.ToolbarSet = 'SetBklein' ;
append
Hi. I have two HTML tables, one with five td elements and another empty. I want to append an element from the fist table on the second table and delete it from the first table. So here is code: <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ }); </script> </head> <body> <script> $(document).ready(function(){ var numElems = $('#data-source td').length; console.log("Before deleting
Any ideas to disordering a table?
Hi, I'm new at the forum and new in jQuery. I have to alter randomly the order of the td elements of a table. Do you have any idea to do it "quickly"? My initial idea is: - Clone the original table (I can't modify it). - Disorder randomly the elements of the cloned table. - Show the cloned table. The actual code is: <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ }); </script> </head>
Creating extra large radio buttons?
I cannot believe this is NOT possible but thus far, I've scoured the web for hours looking for an easy way to make a radio button about 10 times larger than it normally is, and make it use custom colors. For example, I'd like to use custom images for the "selected" "unselected" and forgo the normal radio button entirely. Can this be done? However, I'm hoping to KEEP the radio button as an input method in the HTML, since jQuery has some super useful tools to manipulate input via radiobutton (or other
Multiple Show and Hide using a MYSQL Fetch Array?
Here is the code function wall_home() { global $ir,$c,$userid,$h; $wall=mysql_query("SELECT * FROM wall",$c) or die(mysql_error()); print "<table width=100% class=forumline> <th colspan=4>The Wall</th><tr> <td colspan=2 align=center><a href=thewall.php?action=post>Make A Post</a></td><tr> <th width=30%>Poster</th><th width=70%>Post</th><th>Action</th><tr>"; while($wa=mysql_fetch_array($wall)) { $user=mysql_query("SELECT * FROM users where userid={$wa['wallUSERID']}",$c) or die(mysql_error()); $wu=mysql_fetch_array($user);
Replacing content with Regular Expressions.
Hi All, I have a string content which include the content "[some number]". I wanted to replace the inner number which is inside the square bracket with jQuery regular expressions. the number inside the brackets are always variables. Any suggesstions??
toogleclass two div one above the other
Hi All! I'm newbie to jquery.. I have two absolutely positioned div, one above the other. One of two, have the class .hide {display:none} Under the divs, there are two link that i would change the class from one div to the other, with a small fade. The link 1 must assign the class to the div 2, the link 2 assign the class to the div 1. So, the link 1 show the div 1, and the link 2 show the div 2. I think it's easy. I tried in this way, but don't work. $("ul>li>a.link1").click(function () { $('#div1').ToggleClass('hide')
get box-shadow .css()
i can't get the propriety box-shadow with jquery css selector .css(); this is a bug? or i'm writing wrong? $(this).css('box-shadow'); i need it work in IE Thanks.
using - inside a string
I am having a bit of trouble understanding understanding this function. Specifically, I am having a bit of trouble comprehending what the "-" does. Is it simply the opposite of using +? Any help would be greatly appreciated. The code: $(a[rel=dropdown-req]").click(function(){ $(".dropdown").show().css({ top: $(this).offset().top - $(".dropdown .arrow").position().top - $(".dropdown .arrow").height()/2 + $(this).outerHeight()/2, left: $(this).offset().left - $(".dropdown").outerWidth()
Integrating jQuery into a mysql array?
This is my first step so if this cant be done its okay just need some pointers Here is the code: function wall_home() { global $ir,$c,$userid,$h; $wall=mysql_query("SELECT * FROM wall",$c) or die(mysql_error()); print "<table width=100% class=forumline> <th colspan=4>The Wall</th><tr> <td colspan=2 align=center><a href=thewall.php?action=post>Make A Post</a></td><tr> <th width=30%>Poster</th><th width=70%>Post</th><th>Action</th><tr>"; while($wa=mysql_fetch_array($wall)) { $user=mysql_query("SELECT
Switching Content between two DOM elements
Hi Guys, Sorry this could be a really stoopid question, just started learning jQuery I'm trying to switch content of two DOM elements (I hope i've got the terminology correct there) but i'm struggling I can clone 'test_container_2''s content to ' test_container_1' but I would really like to switch the content '1' to '2' and '2' to '1' in one movement if possible, or if I can somehaow capture the content in a variable and then apply the variable to the other content of the container that would be
using + and ? inside a string
Hi, I'm having a problem with using special characters inside a string. I want to use the code: var select_string = color_value + "+AND+" + size_value; where color_value and size_value are variables. and I wish my results to be an url looking like this: advanced_search_result.php?keywords=Metall+AND+17 However it looks like this: advanced_search_result.php?keywords=Metall+AND+17 The + sign turns into +. Any idea? I've tried the usual &....; and searched for java special text characters with no reslut.
datepicker and timepicker problems with doc ready, how to find solution
Hi, I've built a complex web application that loads content into the main page using .load of php pages. Some of those pages are using datepicker and timepicker. I have these working ok to a point, but there is some troubling behaviour. e.g. sometimes when clicking a date field, the calendar doesn't appear. The timepicker seems to work ok most of the time. Clicking around like a loon on various pages sometimes makes the field work with dates, but other times not. Sometimes I see the calendar
Why selecting first element from wrapped set is giving error ?
Please see this code: $(function(){ $("div.expandable").css("width",$("div.expandable")[0].width()+200) }); as you can see i am first of all getting a wrapped set of all div whose class is set to expandable, and then calling method css to set width property of those all div to present width plus 200 pixel more. The inner jQuery selector $("div.expandable") will also return a wrapped set so i used element at zero index to get its width $("div.expandable")[0].width() . But this is returning error:
must use "var" to declare a variable?
must use var to declare a variable or just type the variable only? example: var myvar = this.val(); or myvar = this.val(); What is the right to use? I tested both and it worked, but it may be that some of the two is the safest and most advisable to use.
Ways to make on-hover content stay in place when you stop hovering?
Hello, I have my site setup to display its content when you hover over the buttons on my nav bar using css. Once you hover over the button the content will stay up as long as your mouse pointer is over the content box. I'm running into two problems that make me want to get the content box to stay open unless you click off of it. The first issue is that some of my buttons are close the the bottom of the content box and its not very hard at all to let the box close by mistake. I could fix this by making
$ajax my script dosent Works, help.
Hello i use $ajax function for my website but the script which I have write works not correctly Here is the script: <script src="jquery-1.4.2.js"></script> <script language="javascript"> $().ready(function() { function get_tableau(client, responsable, present, tri, sens, tri2, sens2, ladate) { $.ajax({ type:"POST", url:"tab.php", data:"client="+client+"&responsable="+responsable+"&present="+present+"&tri="+tri+"&sens="+sens+"&tri2="+tri2+"&sens2="+sens2+"&ladate="+ladate+"", dataType:"html", success:
jquery selector/wordpress problem
Hi there, I'm trying to piece together a WordPress theme and am teaching myself a bit of jQuery in the process, however, I'm slightly stuck on something desirevo dot com In the top menu at the above address I just want those initial, big links (inline list-items) to drop down. However, because there are aspects of WordPress that are automated, it's not proving as straight-forward as I'd like to achieve that, and instead it's affecting every consequent list-item beneath it. Does anyone know how I
simple image gallery help
I have the basic image gallery set up for thumbnails to populate a larger image... i uploaded it quick, take a look http://dl.dropbox.com/u/9883217/gallery/index.html only thing i need to do is make the next and back buttons work...i know its something simple im missing if you bring up the firebug console i have several console logs on the next button
basic .ajax failure
(still a) newbie here: Stripped all the code out and it still doesn't work. This is so basic that searching around has only found discussion of more complicated problems. The form alerts, success is called and alerts ("back: ") but no txt and the .php does not open log? If I replace 'url' value with http://mylocalMAMP:8888/test.php the log file is opened but still no data return. Am I not returning a correct header? Going in circles for a couple hours so any advice/flames/pointers appreciated. $(document).ready(function(){
Next Page