jquery

How do I get a jQuery ColorBox window to open when clicking a checkbox?

I'm trying to get a jQuery ColorBox window to open when a checkbox is checked and I'm having some issues figuring it out. First of all, can it be done with out making major changes to the colorbox.js file? If so, can you help steer me in the right direction on how to go about this? Thanks in advance. ...

How to fade in/out an HTML DIV container using JavaScript?

I have an DIV container with an id="myDiv" attribute+value. I'd like to fade this in/out smoothly. Would I have to create some sort of run loop with an timer and then modify the opacity value of the DIV? Is jQuery perfect for this kind of stuff? ...

Regex replace problem with (mostly) string content

Hey all; I'm trying to wrap all occurrences of an IP address with an HREF so I can then Do Stuff(tm). I've run the regex itself through several validators, and it matches pattern as expected. Therefore, I'm thinking my problem is in the implementation, but I can't see the correct path. Can anyone help out? Here's the regex and relev...

finding anchors with rel attribute and external value

Hi, I'm looking for a jQuery translation of the following: function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel"...

How do I load content from a blogger blog with jquery?

I want to get individual posts from a blogger blog, and make them into individual classes and add their content to my website. I need to do this because the hardware that I'm hosting my website on has very little processing power (pentium 3), and very little ram (512 mb), and if I were to just put a wordpress blog on it, response time wo...

JQuery Scrollable Missing position onload and on api seek in webkit browsers

Hiya All, Strange issue i am having while working on this in the bottom right hand corner is a history section with a scrollable section that moved right or left. On load it picks a random number and moves to it. Problem is that on load (without moving) it loads in the wrong position, and on moving with the api it moves to the wrong of...

jquery load using element id

I am sorry if this is a lil unclear, but I am having problems conceptualizing what I want todo. I am using have a list of div's like so <div id="1" class="ajax_category"> <p> Blah </p> </div> There is a javascript set to make a ajax request to a url when the div id is clicked. This works fine, but I am having to repeat mysel...

use jquery to modify class attribute

<ul> <li><a class="selected">A</a></li> <li><a>B</a></li> <li><a>C</a></li> </ul> How can I remove the attribute selected from all <li>'s when one of the element is clicked and set the one being clicked to selected? I'm learning jquery. Updated the code ...

jQuery: How to test is the browser supports the native placeholder attribute?

Hi, I'm trying to write a simple placeholder jQuery plugin for a site of mine but of course I only want to fire the function if the native placeholder attribute isn't supported… How can I test for native support of the placeholder attribute? Thanks for stopping by. ...

Jquery won't recognize non table cells as descendants in table rows?

Working on a tooltip for a table row, I put a span in a table row with a class of "tip" and then tried to select that through find('.tip') but this wouldn't work. $(".tip_trigger").hover(function(){ tip = $(this).find('.tip'); tip.show(); When I put the .tip class on a td it worked fine showing the tooltip. ...

Input value undefined inside nested loop - jquery

Hi, I have been trying to solve this for a while. I am trying to get value of a form input which is inside a nested loop. But its coming undefined. Any idea why so? Thanks much for your help in advance. Here is the code for example. I am getting the value of $(#fund-no-"+f).attr('value') without any problem. Its $("#year-" + year_amt +...

JSF: Can inputText invoke a method inside managed bean when I press the return/enter key

So I have an inputText that has its value hook to myBean.text, I want that if I click enter/return key, the inputText will invoke a method inside myBean to do something. Can any one help me? EDIT <p:inplace label="Add Comment"> <h:inputText id="keyword" value="#{PostComment.comment.comment}" style="width:100%;" onk...

I imported a jQuery plugin into my project and my <a> tag CSS is overriding its <a> tag CSS

I have a page that uses certain styles that I have defined. On the same page I just imported an external jQuery plugin that uses its own styles, including, for example, an <a> tag style that is being overridden by my own. How do I ensure that the styles in my stylesheet do not override the styles in the stylesheet of the jQuery plugin?...

Edit in a new page with jqGrid

Hello, I would like to edit the rows of my jqGrid in a new page. I have setup a custom function for the edit button with the use of the parameter "editfunc". How can I redirect the user to that page within the javascript function? I am using asp.net MVC 2. ...

Unbind widget events.

Hello, I'm writing my own widget and all works fine except the destroy method. It seems that all events aren't unbind properly... (function($) { var _super = $.Widget.prototype; // $.widget("my.cool", { _create: function() { var $self = this, $element = this.widget(); $element.mousedown($sel...

How do I get IE to properly reposition an element after a sibling resizes vertically?

I have the following markup: <nav id='tab_links'> <a href='#view1'>One</a> <a href='#view2'>Two</a> </nav> <div id='container'> <div id='view1'>Short Content</div> <div id='view2'>Much longer content</div> </div> <footer> <input type='submit' /> </footer> and the following styles: #view2 { display: none; } #footer { display:...

Iterate through a group of select controls and choose only the ones that have a specific selected value

I need to iterate through a group of select lists on my page and choose only those selects that have the selected option of "Yes". Something like (which doesnt work): $(".option-select option[value='yes']:selected").each(function () { alert($(this).attr("id")); }); ...

Expand the contents of a select element to increase the number of option elements.

Hi folks, I've got a select element with a large number of option elements and I'm looking for a way to toggle between having all options available and having a subset of the options available for selection (the subset being the most popular options). The options are ordered alphabetically and are grouped by their value's initial lette...

Inversing DOM with jQuery

Input: <content> <dom id=1>a</dom> <dom id=2>b</dom> <dom id=3>c</dom> <dom id=4>d</dom> </content> Output: <content> <dom id=4>d</dom> <dom id=3>c</dom> <dom id=2>b</dom> <dom id=1>a</dom> </content> I'm looking for a function (if exists) like this: $('content').inverse(); ...

How to disable jQuery Fullcalendar plugin window resizing?

I'm using the FullCalendar plugin and it's working very well. I would like to disable the dynamic resizing of the table and its cells when the browser window is resized. Is that a possibility? (I noticed in the documentation the 'windowResize' callback fires after the calendar is already resized, so it looks like that won't help.) ...