jquery

Selected text event trigger in Javascript

It may sound a newbie question but I wanted to know how I can trigger a custom JavaScript function when someone selects a given text fragment on a page using mouse. Also is there any way to find the position of selected text on the webpage? Update: To be more clear, text fragment can be part of a sentence or a word or a phrase or whol...

How do I pass parameters to javascript from each page dynamically

The following code provides Remove capability on each of the list page (e.g. sample list page given below), of which only 3 variables (tableId, removeButtonId, headerCheckbox) vary in each page. How do I re-use this script across all pages, instead of defining this in each page. How do I pass parameters to this script from each page dyna...

calling jquery ajax() with drop down menu?

im working a domain check script it works fine when i call ajax on keyup but by default the dropdown has the .com what if the user chooses a domain that is already taken, how can i get this script to do another check when the users switch from .com to .net or .org? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://...

Very slow function, is there a faster way? (using jQuery 1.4.2)

The following function needs at least 3 seconds to run (on 500 table rows). Is it possible to make this function faster? function prepareTable() { var groupIndex = 0; $("#row tbody tr").each(function(index) { // each row gets a unique id // remove default css styles for table rows // read out hidden value, that store...

jquery get the id/value of LI after click function

< ul id='myid' > < li id='1' >First< /li > < li id='2' >Second< /li > < li id='3' >Third< /li > < li id='4' >Fourth< /li > < li id='5' >Fifth< /li > </ul> How can I alert the id of the li item clicked(anything that can replace the id may be value or something else will also work) please help thanks in advance Dave ...

Adding elements into accordion

Adding elements to the First for a tab in the accordion breaks it. I'm looking to add some images into there that can be manipulated through css http://jsfiddle.net/4wSqn/5/. ...

jQuery URL matching for dual hover states

I'm building a website that has two menus on one page, each with identical links but one menu is images with a hover state and the other a list. What I need is to use jQuery to make each corresponding links to to show a hover state at the same time. Meaning if you hove over an item in the list menu the link with the same url in the ima...

How can i reload the page or a div using jquery and then catching the update like twitter?

to clarify you know when your on twitter and you get an update telling you have 2 new tweets, i got the ajax referesh page bit sorted but how do i catch the new update and count them!! if i make sense sorry!! help will be appreciated cheers! kindest regards Solomon saleh ...

JQuery: Validating Data Rules

Site: http://tinyurl.com/2cjlsxk This code is not optimized nor is it the best method. If you have any ideas to improve anything, let me know. Please visit the site to get an idea of the data. I have used Dan G. Switzer, II's calculation plugin [adding .sum() .max() .min() .avg()] The validation requirement i'd like to have is to make...

constantly check iframe if url has been changed from inside via Jquery

Is this possible? ...

Always ensuring that div tag is at top of page using jquery

I have a div tag <div id="customError">Error</div> I want this div tag to always appear at the top of the page using jquery, so with otherwords even if the page is scrollable I want it to be always visible and on top of the page almost like the stackoverflow notification bar. Is this possible using JQuery? I tried a number of things and ...

how can i load an external page into a div using jquery?

i have a menu with 3 links, when the user clicks on a menu link i want the page to load on a div on the same page using jquery, im using php and mysql! thank you! ...

How do I vertically center the modal in an iframe?

I have a web application that: 1. Is an iframe (it appears in multiple places, e.g facebook). 2. Has modals in it (I'm using jqmodal). 3. Has a vertical scrollbar. The problem is that when a modal is opened from a link at the bottom of my page, the modal appears at the top of my page, so the user has to scroll upwards in order to see th...

Cross domain with jQuery - on a subdomain

I have a iframe and want to either get some of the HTML from the page in the iframe or the opportunity to change the HTML on the page in the iframe with jQuery. I use this code to get content from the iframe: $('iframe#iframeBB').contents().find('table').each(function() { var at = $(this).attr('summary'); if (at == "Latest Data") { ...

jQuery select list element not working

I'm trying to select the first list item li in the ul#suckerfishnav in the main navigation here: http://fluroltd.com/clients/harveys/. Using $('ul#suckerfishnav').find('li').slice(0,1) { $(this).css('background-color', 'red'); }); My aim is to add a class="first" to the first li in the list. ...

how can i do the clickable button effect using jquery/css? example provided

i want to have this button effect on my website, theres an example on http://www.ohlife.com when you click the signup, for free green button , it deos this kool effect(it pushes back)!!, i hope i make sense!! ...

jQuery removing repetition in multiple Colorbox method calls

Hi, I needed some advice on how i can remove the repetition in my current project. I have several colorbox dialog windows which are of the same size, have the same transition etc when they are called but perform different jquery manipulations, AJAX calls etc when they have completed loading. Currently they are all in their own seperat...

[jQuery/CSS] Slider with multiple elements

Hi! I'd like to create a slider like in these image galleries. It should show multiple entries at a time, as shown in the following image: http://i.imgur.com/nTBPw.png (@ILMV sorry, I'm not allowed to place it by myself..) When I click on the right arrow it should slide ("iPhone-like") to the left so that you see 5, 6, 7 and 8. The en...

Mouse position in jQuery Dialog open function

How to get a mouse position inside open function of jQuery Dialog? ...

how can you make a processing jquery button, like the follow button on twitter?

for example the twitter follow button when pressed it sends an ajax call through php script and then displays unfollow: how could that be acheived using jquery and css? ...