jquery

How to conditionally execute a jquery validation?

I am validating form using jquery validation plugin...... rules: { Name: "required", MobileNo: { required: true, minlength: 10, remote: '<%=Url.Action("getClientMobNo", "Clients") %>' }, Address: "required" }, messages: { Name: "please provide a client name", ...

SimpleModal bug when positioning HTML5 video

I am trying to use simple modal to display a modal window containing a video. I'm using the HTML5 "video" tag to do this. Using JQuery and SimpleModal, I can get it working in Chrome and Firefox, but for some reason Safari fails to maintain the centered positioning of the modal dialog for the video. In other words, when you scroll up an...

Sequencing 2 lines of jQuery

I have the following lines of jQuery: // When dragging ends stop: function(event, ui) { // Replace the placeholder with the original $placeholder.after( $this.show() ).remove(); // Run a custom stop function specitifed in the settings settings.stop.apply(this); }, I don't want settings.stop.apply(this); to run UNTIL th...

SimpleModal bug when positioning HTML5 video

I am trying to use simple modal to display a modal window containing a video. I'm using the HTML5 "video" tag to do this. Using JQuery and SimpleModal, I can get it working in Chrome and Firefox, but for some reason Safari fails to maintain the centered positioning of the modal dialog for the video. In other words, when you scroll up an...

uploadify changing scriptData

when i call uploadifySettings("scriptData", { 'description': description }); it mean that param description is set one time after click button upload, how can i set param description on each file that uploads ? for example i want to upload 10 files so i can change param description 10 times ...

Set focus to textbox

Hi All, In my web page there is a textbox with width and height equal to 0. This textbox is used to get the scanned bar code value which should not be visible to the user. Needs: I want to set focus to the textbox, when i click anywhere in the form. I want to make the cursor invisible. Geetha. ...

Passing variables to callback functions

I am trying to write a jQuery plugin, that can be applied to a selector. Within this plugin, there are multiple calls to webservices, where callback methods are required. The problem I am having is maintaining the current context item in the each loop of the selector. (function($){ $.fn.myMethod = function(){ return this.each(fu...

Can we Make a checkboxList using jquery like we fill the options in select tag of html?

Can we Make a checkboxList using jquery like we fill the options in select tag of html? I am confused how to make a checkboxlist using Jquery in Html? I have seen Method for creating option tag in select tag of HTML But I dont know how to create a checkbox list? $.fn.fillSelect = function(data) { return this.clearSelect().each(...

jQuery UI tabs link for _blank webpage

Hi fellas, In our format some pages must be in Tabs that's ok. But some of them must be open in a blank page... Here is the html; <div id="tablar"> <div id="tabs"> <ul> <li><a href="#tabs-1">Tüm Liste</a></li> <li><a rel="ex" href="gtl.aspx?EventId=2">Yeni Ekle</a></li> <li><a href="#tab...

Scanned value(using scanner) in the textbox

Hi All, I am using Scanner(basic model) to scan the barcode. Scanned barcode will be captured in a textbox. In txtBarcode_TextChanged event i am getting the barcode to access. Problem: If i clicked the scanner more than once, the barcode gets append with the previous value. Code: protected void txtBarcode_TextChanged(object sender...

jQuery: If user clicks out of div

I am creating a popup in query. All is well with the popup on hover. I made it see a timer starts when user's mouse leaves the div to close it. If he enters the div again before the timer is done, then the timer is cleared. This is fine, but what if a user clicks out of the div? I want that to also close the div. The only problem is tha...

jquery dynamic id

i use such code to access item function f(id){ $("#"+id).val(); // with analogy $("#id item") } is it correct? is any other methods? ...

Modal login popup like digg

Hello guys, I need to add login modal popup in my project like Digg login popup, Please suggest me different modal box popups to achieve this, Any pointer or suggestion without be helpful thanks ...

JQuery - click trigger on select box doesn't work?

Does anybody know how dropdown list can be opened with trigger? Here is code which doesn't work: $('select').trigger('click'); Just for note - mousedown and mouseup also doesn't work. ...

jQuery: How to deal with 'this' in AJAX callbacks

I currently have code similar to this for a form: $('#some-form') .submit(function() { // Make sure we are not already busy if($(this).data('busy')) return false; $(this).data('busy', true); // Do post $.post("some/url", $(this).serialize(), function(data) { ...

best way to filter out non-representational elements

Hi there, I am using phpQuery in order to apply some twaks to editorial content. As its syntax is the same as jQuery, I consider this a dom scripting issue. To get rid of elements which are not representing anything, but wrapping other stuff (like the div in <div><p>blah</p></div> I came up with this selector: $doc['div:not([alig...

Jquery getJSON() doesn't work when trying to get data from java server on localhost

The whole day yesterday I've been trying to solve this but it's proven to be very challenging for me. I'm trying to use this JS to get information from a java application I wrote. $(document).ready(function() { $.getJSON('http://localhost/custest?callback=?', function(json) { alert('OK'); $('.result').html(json.description); ...

controlling the colorboxs position

I'm using the colorbox plug in for several messages on my web page and I have one specific message that I want it to appear higher on the screen (so it won't hide the center of the page). Is there a parameter that controls the colorbox location on load? Thanks. ...

jQuery UI - Draggable is not a function?

Hi, I've trying to use the draggable effect on some divs on a page, but whenever I load the page, I get the error message: Error: $(".draggable").draggable is not a function I've had a look around it seemed other people were having this problem as they had not included the jQuery UI javascript file, but I definitely have. The follow...

Replacing the Element with specific attribute and its value

<p> lorem ipsum lorem ipsums <font style="background-color:yellow">ipsum</font> ipsume lorem </p> how to replace the <font> tag with <abbr> so the out put will be like this. <p> lorem ipsum lorem ipsums <abbr style="background-color:yellow">ipsum</abbr> ipsume lorem </p> ...