jquery

How to get value of nearest input Jquery

I have multiple buttons on my page with the same class. When I click on a button I want to get the value of the nearest input box (remember there are multiple input boxes and buttons on my page with the same classes). I have: $(".deletepostbutton").click(function() { var deleteid = $(this).closest('.deleteid').attr('va...

jQuery: how to find out when next() reaches the end, then go to the first item

I am displaying a series of elements using the next() function. Once I reach the end though, I want to go to the first element. Any ideas? Here's the code: //Prev / Next Click $('.nextSingle').click( function() { //Get the height of the next element var thisHeight = $(this).parent().parent().parent().next('.newsSingle').attr('...

How can I hide a div when not hovering anymore

I am using Jquery to hide show a div. I want to show the div when '.microblogpostwrapper' is hovered and hidden when not hovered. Got the first bit done but can't get it to hide when not hovered. $(".microblogpostwrapper").hover(function(){ $(this).find(".microblogpostactions").show(); }); ...

jquery slideUp() to the left side

Hello, i will create a weekly calendar. When i switch the week, i would like to slide the old week to left or right to get the new content. Can anybody help me? At the moment i have no good idea to implement this. Thank you very much. ...

Smooth jQuery animations in firefox vs safari

I love how the following animates in Safari, but hate how it does in firefox (click an event name, then click "previous post" or "next post" at the bottom of the page). Is there a way to "smooth out" the animation like it does it in Safari? EDIT: In firefox there is kind of a "flash of white" as the two images cross each other. It looks...

checkbox image replacement,nothing happend

<?php //require 'includes/db.inc.php'; require 'includes/configs.inc.php'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <title><?php $site_name ?></title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script t...

jQuery - sepcify a directory for cycle plugin

forget my question for a while... bad choice of words i am using this code for a jQuery Cycle Slideshow... script is here... you may skip it and proceed to question <script type="text/javascript" src="code_snipets/jquery.js"></script> <script type="text/javascript" src="code_snipets/jquery_plugin_cycle.js"></script> <script language="...

Custom drupal ajax forms based on content type cck

Why hello there Stackoverflow, I have a nutcracker for ya, is there an "good" way to create 100% custom forms or rather just textboxes and have the values sent to an url like so: http://site/drupal/formreciever-content-type , post-sending the values of X textboxes with jQuery for example? Without having to do so much backend work, right...

get identifier of link given the class jquery

i have this piece of html <li><a href="#" id="9000" class="yes vpslink"><img src="x.gif" /></a></li> <li><a href="#" id="9001" class="no vpslink"><img src="x.gif" /></a></li> $('.vpslink').click(function(e) { var id='i dont know dude'; alert('you clicked on id'+id); }); How do I find the id of this class, link ? ...

how to get all 'li' element from #1 to #demo1 using jquery .

this is my code: <div id="demo1"> <ul> <li>aaa</li> <li> <ul> <li>hhh</li> <li>qqqq</li> </ul> </li> <li>qqqqq</li> <li> <li>lll</li> <li> <ul> <li>qqwed</li> ...

Jquery Buttons - How to show disabled state

I am using Jquery buttons (http://jqueryui.com/demos/button/) for my UI. I would like to know how I can show a disabled state. Show the button as greyed out or something, you know how when you post a form on some sites the submit button shows as disabled. Also is there anyway to display an active state??? This is my code: $(".commen...

how to get <head> content of the current page with jquery or Jv

how to get <head> content of the current page ...

Prototype to jQuery: Mindset migration?

This isn't about a side-by-side technical comparison, rather about how to "think in jQuery" versus "thinking in Prototype". I've used Prototype heavily for several years, and jQuery somewhat less heavily until about a year ago when I started doing a lot with it. With Prototype, I can write some fairly elegant code; my boss once reviewe...

Jquery - How to set an attribute with index starting at 1 instead of 0?

$('ul li a').each(function(index, element){$(element).attr("href", "#img"+index);}); I'd like my list item links to start with the href as "#img1" and count up from there for each item. The code I have will start at "#img0" which doesn't work for what I'm trying to accomplish. Thanks for any help. ...

How to get jquery jScrollPane and jscrollHorizontalPane plugins working together?

I have a div where I must have both vertical and horizontal scrollbars stylized. I'm already using jScrollPane by Kelvin Luck. But I would like to integrate it with jscrollHorizontalPane, a mod based on the first. Has anyone able to make them work together? Any other suggestion will be very welcome. thanks. ...

jquery testing - pausing the DOM?

Is there a way to sort of "pause" the DOM (in either firefox or chrome). Meaning, perhaps there's an animation happening and I'd like to be able to stop and see exactly what the markup looks like and such. Some animations happen too quickly for me to use "inspect element" or anything. ...

jquery json to string?

Instead of going from a json string and using $.parseJson, I need to take my object and store it in a variable as string representing json. (A library I'm dealing with expects a malformed json type so I need to mess around with it to get it to work :( ) What's the best way to do this? ...

Turn function on and off

I have a jQuery tip function. I would like to create a button to turn on and turn off the function. I want it to be on by default. Is it possible to create a link to turn on and off a function? ...

Jquery - Is it possbile to add animation to AJAX loaded content

I have some content that I am loading to my page using AJAX. When it loads it flashes on screen and looks a bit messy. Is there anyway to add some jquery animations to it??? $("#posts").load("posts.php", {from_user: fm}, function(){}); ...

how to remove all attributes from <body> with js or jquery

how to remove all attributes from with js or jquery. (I don't know what is the attributes in the body, i want remove all them) ...