jquery

[jQuery] Load specific elements from a page with an AJAX call and append them to a list?

I've got two page: Page 1 has a title, an empty ol and some jQuery that calls an AJAX function. Page 2 has an ol filled with list items from which I plan on pulling specific ones. The AJAX I'm using looks as follows: $("#loader").load("ajax.html li:nth-child(1)"); It works great in pulling in that first li. However, if something is...

How to create a function and call it on event.

Hello, I've included code for my textbox/textarea counter I put together. (hope it doesn't get mangled in my post...) The script works quite well, however I know my code is ridiculously bloated due to my inexperience with jquery and javascript. I was hoping someone could show me how to take the repetitive code (//event one thru five) ...

Renumbering a List using jQuery

I have a list powered by jQuery UI's sortable that allows a user to order line items. I want to have a number that represents the position of that object after it is dropped. <ul> <li><span class="number">1</span> Apple</li> <li><span class="number">2</span> Microsoft</li> <li><span class="number">3</span> Canonical</li> ...

Right angle with CSS/Javascript?

I have a design that I'm currently slicing that features a lot of right angles (Example: http://grab.by/1jli ). I was wondering if a CSS or Javascript (jQuery) solution exists to pull this off? Otherwise I'm going to have a ton of sprites with these crappy things in them. Just a heads up, I've already tried "Corners", the jQ plugin, and...

Set back again the current menu link to "active" once navigation through menu stops

Ok, maybe you can't understand much from the title, so I'll try to explain it a bit more in here. Basically I have a navigation, like this: <ul class="primaryNav"> <li class="nav1"><a href="#" class="inactive" title="About us">About us</a></li> <li class="nav2"><a href="#" class="inactive" title="Our world">Our world</a></li> ...

Passing information to jqModal

I'm using jqModal inside a Django application. What I would like to do is have a bunch of different links each of which passes a parameter to jqModal to have it call a different ajax url based on the parameter. For example, depending on the ID of what is click on, I want to do something like: $('#popup').jqm({ajax: '/myapp/objects/' +...

menu with jquery

I want to make a menu for the admin side of a website and when I saw the top bar of stubleupon I wanted to make a menu with same style, always on top even when you scroll down, and has drop down items. here is the link to sumbleupon exemple : http://www.stumbleupon.com/su/2qQfq3/www.thevirtualpiano.com/ and I am not very good in javascr...

reinstate Jquery features after flash callback

Hello all, I have a page that uses the jQuery.swfobject plugin to embed 5 flash items into a page and each flash item has a callback using externalInterface. The callbacks work when I have the js function outside of $(document).ready(function() but the jQuery animations do not fire - the ajax load however does. Does anyone know how to...

Using jQuery for table manipulation - row count is off.

Hi. I have a loop on the server ( C# ) that does this: for(i=0;i<=Request.Files.Count - 1; i++) { // tell the client that the upload is about to happen // and report useful information Update(percent, message, i, 0); System.Threading.Thread.Sleep(1000); // tell the client that upload succeeded // and report useful ...

JSON use in Javascript

I have been mis-interpreted. I have created a JSON Object in PHP. I just need access to that object in Javascript. thats all. i just learned that many of my problems can be solved by using JSON. now how to use JSON is another problem, though ;-) suppose this is the code in PHP: $row = array() while ($row = mysql_fetch_object($result) ...

jQuery / Colorbox - create a separate link to open the colorbox?

I'm trying to open a jQuery Colorbox from a link outside the rest of the colorbox images. So, all of the examples look like this: <a href="image1.png" rel="group1"><img src="thumb1.png" /></a> <a href="image2.png" rel="group1"><img src="thumb2.png" /></a> <script>$("a[rel='group1']").colorbox();</script> OK, that's fine, but I also ne...

How to get all css's settings using jquery?

I'd like to know all css settings in page using jquery. I know to get some css's setting, we do like this, $('#container').css("width") As this, I tried to use $('*') to get all css settings but couldn't success. Please give me some advice. ...

jQuery Validation plugin with JQGrid?

Has anyone successfully used the jQuery Validation plugin with JQGrid? I realize that JQGrid has its own validation scheme, but it's limited and a little clumsy; and I'd prefer to reuse the validation UI, language, and rules that I'm using with the rest of my forms. ...

receiving data in php through jquery ajax

i just got the hang of using jquery ajax for example, this code sends the contents of the comment box to the php file. $.post("user_submit.php", { comment: $("#comment").text() }); the question however is how do i receive the data in the user_submit.php file? ...

jquery copy json object

I'm iterating through a set of json data which carries results of a few database tables. Amongst other data I have a RateTable ...erm... table, and a Resources table. The RateTable has a property name ResourceId which links to the Resources record. So, I'm iterating through my RateTable and I need to reference my Resource record and us...

$.post not POSTing anything

i am using the following jquery to post comments to user_submit.php var submit = document.getElementById("submit_js"); var comment = document.getElementById("comment"); $("#submit").bind('click', function(){ $.post("user_submit.php", { comment: $("#comment").text() }); }); the user_submit.php listens like: $comment = htm...

url hashing with search results using Jquery Address

Hi guys! What can I do if I want the browser to "remember" search results requested with ajax? I am using the jquery plugin Jquery Address but I can't piece together how to do it here's a code snippet from my form submission: var ajaxforms = { searchoptions : function(){ $('form#searchoptions').ajaxForm({ url : ...

JSON output not properly parsed by JQuery?

As it stands, I have some JQuery along these lines - ph=function(i){ $.each(i,function(po){ id=po.id;url="/"+id;t=$('<div id='+ id +' class=entry></div>'); t.html('<div class=hx><a href="/users/'+ po.author +'">'+ po.author +'</a></div><div class=b>'+ po.body +'</div>'); t.prependTo($("#modpskx")); t.hide(); t.slideDown("slow");});}; fu...

jQuery remove the prev occurance of a class?

I have a class that I want to dynamically remove based on a link. How do I select the parent "added" class with jQuery. There can be multibpule instances of the class I only want to remove the closest parent. Example: <div class="added"> <div class="cl">&nbsp;</div> <label>Add Item<br /> <span>What to Add</span> ...

Getting the label of "this" in jQuery

The following is my code for changing the color of the label of the input field in focus: $(document).ready(function() { var name = $(this).attr("name"); $(".comm-input").focus(function() { $("label[for=name]").css({"color" :"#669900"}); }); $(".comm-input").blur(function() { $("label[for=name]").css({"color" :"#999999"}); });...