jquery

how to write a javascript plugin(like jQuery) which can do string operations

I would like to write a javascript plug in which can string manipulations something like substring, replace, trim and customized user functions. Where from should i start to write (if there is no this kind of plug-in) ? like: $("my string will be this").substr("will","would",{first}); or $("my string will be this").replace("will","w...

How to call textual function in javascript/jquery?

For example: <input id="#me" type="button" callme="doAction()"/> <script> var result = callFunction( $("#me").attr('callme') ); /// ????????? </script> ...

jQuery Autocomplete plugin (Jorn Zaefferer's)

I am getting data from API and updating using setOptions({data:[data_here]}), now after this, I want to display results under search field. This is exactly the same if user press any key and results display against that, but I am looking for displaying results through code. http://answers.yahoo.com/question/index?qid=20101011064107AA5Ez...

how to apply javascript function to multiple textboxes with jquery

I have a form where a user needs to input time entries for a date range. I need to validate what they're inputting so I was hoping I could create one function to simply validate a value to make sure it's numeric. Then tie that function to each textbox that has a css class of hourmin. I think I'm headed in the right direction below but...

delete this question please

delete this thank you ...

JQuery clone <select> element

Hello, I want to clone a <select> input in HTML using JQuery. I'm not sure how to go about it, so thought I'd ask here. Particularly interested in the best way to write it back into the document as well. My select element looks like this: <select id="options"> <option value="1">Opt 1</option> <option value="2">Opt 2</option> ...

jQuery kwicks update params or options

Hi. I'm using jquery kwicks for a projects and on document ready I provide the following functions. an initial function of what the kwicks should do on document ready function which is my whatToDo var whatToDo = 'mouseover'; $('.kwicks').kwicks({ min : 10, max : 480, duration: 800, easing: 'easeOutQuint', sticky...

jQuery Autocomplete How do I use the same local array for two different input id text boxes?

I am currently using this for a single autocomplete box (id="drug"), and it works beautifully. I need to have a second autocomplete box (id="drug2") that uses the same array as its choices. I cannot seem to get it to work at all. Every time I try to modify the code I break it on the both. I'm sure someone out there has an elegant solutio...

Delay slideDown()/slideUp() - jquery dropdown

Hi, I am creating I am creating a drop down which I want to delay about 250 ms so that it's not triggered when someone quickly scrolls across the button. Here's my current code. I tried using the delay() method but it's not going well. $(".deltaDrop").hover(function(){ $('.deltaDrop ul').stop(false,true).slideDown(250); $('.del...

Problem with jQuery cycle plugin

Hi I am using the jQuery cycle pluging, and having some trouble after i added a play/pause option. The code looks like this; $('#img').cycle({ fx: 'fade', speed: 'slow', timeout: 1000, pager: '.imagegallerypager.r2s1', pagerClick: function (zeroBasedSlideIndex, slideE...

jQuery qTip callback not working

I'm using a jQuery plugin called qTip (http://craigsworks.com/projects/qtip/docs/api/#callbacks) and trying to implement a callback function for dynamically loaded data. Here's what I have: $('#orders_table a').qtip('api').onRender(function(){ alert('test'); }) The qTip is being initialized for all of the links within the #o...

jqGrid drag and drop a copy of the row, rather than moving the row?

It's easy to connect two grids for Drag and Drop: jQuery("#sourceGrid").jqGrid('gridDnD',{connectWith:'#targetGrid'}); However, this moves the row from source to target. I want to copy the row from source to target. The default "drag_opt" for gridDnd includes "helper: 'cone'", but it doesn't appear to be cloning. Does anybody have ...

jQuery validate focusInvalid add page margin/padding?

Googled and found nothing, might be asking the wrong question but here goes. How do I add padding/margin on a element that is invalid? I'm using jQuery validate plug-in to validate user input and required fields (As well as some PHP server side validation). The fields are in the middle of the web-page so when the validation happens it...

using the jNotify plugin for jquery

I am currently using jNotify to display my notifications. The problem is that all notifications seem to float over the website, instead of pushing the website down. I have looked at the above link and I can seen an option: classContainer: "jnotify-container" // className to use for the outer most container--this is where all the...

jquery validation change field validation on the fly

Hi, i am using jquery validation and i have the code above <script language="javascript"> $(document).ready(function() { var validator=$("form#myForm") .validate({ submitHandler: function(form){ alert("Submited"); }, invalidHandler: function(form, validator) { ...

How to prevent form submission before progress bar display

I am using Uploadify for a real time application and so far its working fine except this one issue. I have 6 Browse buttons for uploading 6 files (with multi - 'true' for each) and I have a submit button as well on my page (JSP). If the user selects a file on any of these Browse buttons, there is a slight delay before the progress bar ...

Possible to execute jQuery on C# string object?

I am retrieving the HTML source code from a remote URL via C#. I am storing the html in a string. I would like to parse through it, but do not want to use RegEx. Instead of want to leverage the jQuery engine to parse through it. Is this possible somehow? This is how I getting the html from the remote url: HttpWebRequest wr = (HttpWebRe...

Shortcuts for jQuery's ready() method

I have seen some shortcuts for the ready() method and would like to know which actually happens first, because my test results confuse me.. $(document).ready(function(){ alert("document ready"); }); $(window).load(function(){ alert("window ready"); }); (function($){ alert("self invoke"); })(jQuery); Here self invoke happ...

jQuery $.ajax not working with url params in IE

When i do the following: $.ajax({ type: 'GET', url: 'http://www.domain.tld/feed', dataType: 'xml', success: function(data) { ... } }); Everything´s fine in IE(8). But when i change the url option to http://www.domain.tld/?feed=myfeed IE does nothing. I think the ? is the problem, but how can i get this working in thi...

How do I get the div background to change when I mouse over a link - using jQuery?

I need to be able change the position of a background image in a containing div when I mouse over a link within that div. Here is the page: It is the two blue play buttons mid right. I had it working before but it is broken and I can't get it to work properly. Here is the html: <div class="h-video"> <p><a class="play-video" href="#fl...