jquery

jquery animate to min-height or auto

I have some jquery stuff here to animate a layer on click. Problem is sometimes the content may exceed the height allotted in the height setting. Is there any way to modify this to animate the layer to a minimum height or auto instead of a set px amount? $(function() { $(".showcart").click(function(){ $("#cart").animate({ he...

Large double quotes: best way to add them

I'm trying to wrap text in some big nice double quotes. I looked at this tutorial, but seems a little more complicated than I thought it should be. My gut tells me someone here in SO knows a smarter way. I'm open to anything: CSS, or PHP or Javascript, or Jquery (but preferably not JS/Jquery) ...

Change Element Visibility Upon Page Load

Alright, for those of you who have seen the new Google Page, I am attempting to get a similar idea going on my own webpage. Basically, I want the image in the middle to fade in upon a mouse moving on the screen. Here is the URL: http://mageia.rh.rit.edu/ This is the Jquery I am using to get most of the affect: http://hv-designs.co.uk...

jquery unbind method

if my html looks like this: <div id="result_root" class="expand_image"> <image id="expAllArtistImg" class="expImg" src="images/16-arrow-right.png" onclick="expand(this, 'artists', 'artists');"></image> <h1>All Artist</h1> </div> and my javascript looks like this: //change arrow image $(callingImg).attr("src","images/16-arrow-do...

Detect leaving a buried element - Jquery

At the moment I have an image, and when the user puts their mouse over it, using Jquery I place a transparent div over the image. The problem is that this triggers the mouseout event. I want the transparent div to leave when the mouse moves away from the image. What is the best way to detect this if there is a transparent div covering th...

"#orderedlist > li" selector

I'm studying jQuery with this tutorial, but one of examples doesn't work. <html> <head> <style type="text/css"> a.test { font-weight: bold; background: #fc0 } </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#ol > li")...

Select first element that doesn't have a specific class

I want to write a selector that targets the first element that doesn't have a specific class. <ul> <li class="someClass">item 1</li> <li>item 2</li> <-- I want to select this <li class="someClass">item 3</li> <li>item 4</li> </ul> I know how to select all elements that doesn't have "someClass": $('li not:(.someClass)').dostuff(); B...

putting content from iframe into current DOM

Morning all. I have the folowing problem: $(document).ready(function(){ $("#actContentToGet").load(function(){ var htmlCODE = document.getElementById('actContentToGet').contentWindow.document.body; var elements = []; var z = 1; function alterContent(htmlCODE){ $("#createdDivs").html(""); htmlCODE.$("*").each(function(){ aler...

JQuery URL Selector to Replace standard XHTML Form Dropdown

I'm certain this is a simple solution, but had no luck pinning down the right approach (just getting started with jQuery). So, here's the question: I have this HTML form: <form id="callSelect" class="full" method="post" action=""> <select name="Single"> <option value="/var-a/">Var A</option> <option value="/var-b/">Var B</opt...

jquery validation plugin, specify rules

I found the jquery validation plugin (http://plugins.jquery.com/project/validate) and thought that this would be a good way to validate my forms on the client side. (I'm also doing server side validation). The plugin want me to specify the validation rule for each field in the class tag. I'm using my class tag for styling my fields, can ...

javascript load listener

I would like to know if this would be possible in javascript: i have an application, mainly developed in javascript. There are ajax calls fetching html content scattered all around the code. I would like to create an object that listens whenever a load function is being called, and launch a function in that case (like displaying a prelo...

can you have images or any custom HTML displayed in jquery grid (jqgrid) cells?

i dont see anything in the documentation but i am trying to convert over code that is rendered in an html table over to jquery grid but the one missing piece is that many of the columns have images in them or other specialized html that i would like to show in the grid ...

Why in IE8 <script /> won't work with jquery?

Hi guyz, I have a website using ASP.NET MVC, everything was working fine, but I'd like to add some jquery stuff, then I imported the .js in my master page and when I run it my page doesn't work in the Internet Explorer anymore, I only get the background color. In Google Chrome it works nice, so in Firefox. Then I got a look in some page...

JQuery "select all except"

Hi! I am trying to select the first row of a table. Note: the first row is wrapped in a thead tag, so: <table> <thead> <tr> <!-- first row --> </tr> </thead> <tbody> <tr> <!-- body --> </tr> </tbody> <tfoot> <tr> <!-- body --> </tr> </tfoot> </table> The 'select first row' tip could work if it wasn't for th...

JQuery UI Tabs - dynamically adding and removing mouseover event

I would like to add a mouseover event to a UI tab strip when user clicks on a checkbox, but I am trouble dynamically adding and removing events. Here is what I have so far. <script type="text/javascript"> $(function() { // add mouseover event when user clicks on checlkbox called chkbEnableMouseOver $("#chkbEnableMouseOver").ch...

How to move third level li elements up and remove the ul?

I have a fairly large, three level deep, menu consisting of nested lists like in this example <ul class="nav"> <li><a href="#">1</a> <ul> <li><a href="#">2</a> <ul> <li><a href="#">level 3</a></li> <li><a href="#">level 3</a></li> <li><a href="#">level 3</a></li> </ul> </li> ...

jQuery ajax and running timers

Im building an automatic refreshing comment section for my website using jQuery .load. So I am using a javascript 'setTimeout' timer to check for new comments. But after doing some stuff like changing comment pages or deleting (all using ajax), a few old timers keep running, even though I used clearTimeout before loading new ajax conten...

javascript, calling a class which contains a constructor to setup click events etc?

Hi there, i am trying to organize my javascript. What i would like to do is have a class for each PAGE rather then just entering javascript straight into a js - is this good practice? Let me explain .. thinking a long of the lines of, i would really appreciated any input, good or bad and ideas on my variable naming... of remember that ...

addClass to Parent

HTML: <div class="tabbed-section"> <ul class="tabs"> <li><a href="#tab-1">Tab 1</a><li> <li><a href="#tab-2">Tab 2</a><li> </ul> <div id="tab-1" class="panel"> content 1 </div> <div id="tab-2" class="panel"> content 2 </div> </div> jQuery: $('.tabbed-section .panel').hide();...

IE7 ignores :not-selector.

Internet Explorer 7 seems to ignore the :not-selector in the second line in following example, it shows and then hides the content - instead of showing the content with the right index and hiding the rest. $('.dashboard-module-content:eq(' + indexFoo + ') .expand-collapse').show('fast'); $('.dashboard-module-content:not(:eq(' + indexFoo...