jquery

how to get value of first column in current row in html table using jquery

i have the following Delete confirmation code using jquery. The issue is that it assume the location of the name column. I now have name in the first row. Instead of using .prev('td'), is there anyway to get the value from the first column in the current row using jquery <script type='text/javascript'> $(document).ready(function(...

Parsing XFN data with Jquery, round 2

You guys already helped me on correctly parsing the REL attribute on A tags, but there are two XFN values that I'm not able to match: "co-worker" and "co-resident". The hyphen causes an error with jquery. I tried this xfn_co-worker = $("a[rel~='co-worker']").length; and this xfn_co-worker = $("a[rel~='co\-worker']").length; In bot...

Why does CakePHP bork when I use jquery to modify values of hidden inputs?

I'm using cakephp to build a survey and want to use javascript (specifically jquery as it's used elsewhere) to modify some hidden inputs. To be clear, commenting out the offending lines of jquery allows cake to do it's thing properly. But when the values are modified with jquery, this happens: To take just one of the hidden inputs in...

Problem with my Jquery loading in my Codeigniter views

Hello, I am working on a one page website that allows the users to add and remove pages from there navigation as and when they would like too, the way it works is that if the click 'Blog' on the main nav a 'Blog' section should appear on the page, if they then click 'News' the 'News' section should also be visible, however the way I ha...

strip part of a filename with jquery/js

I am using the code below to send an ID to my page: The image names will always look like this 12.jpg 12-1.jpg 12-2.jpg 12-3.jpg e.t.c I need to alter the line below so it will only send the 12 not the -1,-2,-3 e.t.c My code below already removes the .jpg part var id = $(this).attr('src').split('/').pop().replace('.jpg',''); ...

Changing jquery cluetip dynamically

Hello, I am trying to change the cluetip content dynamically by changing the title attribute dynamically as I am using the cluetip plugins splittitle method to generate the cluetip on a table row. I am using the jquery attr(key,value) method to change the title value but the title remains the same as the one which is loaded the first ti...

jQuery: plugin - get reference to passed object

hi all, i'm trying to create my first jQuery plugin. i got a prototype function called myListview and want to apply the plugin (named initLV) to it. the function: function myListview(div) { this.div = div; $(this).initLV(); // apply the plugin } as you can see, i'm passing the whole prototype object to the plugin. my questio...

Rich text editor with blockquote function

Hi there, It's me again, the one who doesn't want to use a plugin, but write my own or use some lines from other plugins ;-). I want to write a simple RTE with the functions bold, italic, list, emoticons and blockquote. I found this simple lightweight plugin http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.htm...

jQuery toggling visiblity of two adjacent spans

<span class='act_inact active'>Active</span><span class='act_inact inactive'>Inactive</span> When I click .active it should become hidden and .inactive should be come visible and vice verca. As these are classes, there are many on the page. $('.act_inact').click(function() { $(this).toggle(); $(this).closest('.act_inac...

Ajax tabs in Web app

We have the application with tabs interface. Currently each tab is loaded as the separated page. And now we need to rework it in the way that tab content should be loaded via ajax. Unfortunately just load the content is with Ajax not enough. User should be able to add to bookmarks each tab. That is why the entire URL should change on t...

jQuery die() Killing All Elements Instead of Only One Specified

Hi all, I have a peculiar issue that I'm suspecting may just be normal behavior, but I need people to confirm. I'm hooking up live click events to a number of <li> elements by using this code: $('li', $list).live("click", rightItemSingleClickEvent); Note here that I am using a blanket selector here to hook up the same live click eve...

Loading multiple views from codeigniter using jquery

<script type="text/javascript"> $(document).ready(function() { $('a.menuitem').click(function() { var link = $(this), url = link.attr("href"); var newDiv = '<div></div>'; $("#content_pane").append(newDiv); newDiv.load(url); ...

jquery thickbox : Refresh some specific calling page elements when thickbox closes

I have a page that gives a summary of selections. People make their selections from within a thickbox by clicking a link on the page. The page works great on first load as the summary content is current. Or after making their thickbox selections, it requires a full page refresh to update the summary. What I would like to do is call a fu...

jQuery attr method failing to add attribute.

In certain conditions I want to open links in the same window, while in others I want to open them in a new window. I have the following jQuery code: if (internal) { jQuery(".main a").removeAttr('target'); } else { jQuery(".main a").attr('target', '_blank'); } I have two <a>s contained in the "main" div. One is directly under ...

Does jQuery ":animated" selector match items that use fadeIn() and fadeOut()?

Hi all, I'm trying to prevent clicks on a list item while an animation is occurring. So at the top of my click handler, I want to do something like this: if(!$(this).is(:animated)) { // handle click code here } Note the 'bang' (!) in the if statement above. I haven't tested, but I assume this will work. What I'm not sure of is wh...

dragStart on draggables repeatedly called in jquery?

Ok. So I'm going to go out on a limb and presume that a draggables "start" event gets fired again after the movement has stopped and user starts moving again, even if hasn't been dropped yet? The main issue is I want my draggable to create my droppables depending on having an odd or even class. But I'm afraid the user may start draggi...

jQuery validation - only show one error message

Is there a way to only show the latest error-message thrown, when using the validation-plugin for jQuery? ...

how can i call a controller action directly from a javascript function . .

I have the following code that shows a jquery ui dialog form with data for the user to enter: $("#dialog").dialog({ bgiframe: true, autoOpen: false, height: 300, modal: true, buttons: { 'Create an account': function() { var bValid = true; ...

jquery selecting a particular class from an element

I'm trying to group related elements using class name. They, in turn, are all related as they are all using the same prefix for the class name. Example: <ul> <li class="category-fruit"></li> <li class="category-grain"></li> <li class="category-meat"></li> <li class="category-fruit"></li> <li class="category-meat"></li> </ul> ...

How to omit opacity changes from jQuery show()

I want to use the jQuery show(700) function, but I do not want any opacity changes. The element in question has a background PNG image with alpha transparency, and the opacity change causes strange black borders around the background image during the animation. How can I omit opactiy animation from the show() function? ...