jquery

set font size in jquery

I'm not able to change font size using Jquery. I want to change font size of a div. I have defined default font size for body as 12. I tried to change it as follows, but it didn't work :( $("#SelFontSize").change(function(){ $("#"+styleTarget).css({'font-size':'"+$(this).val()+"px'}); }); ...

ajax in Jquery & struts2 action sample

Hi i am new to struts2 and ajax. I want to verify the userInputs before submission by querying from the database. So i planned to implement Ajax.based on the validation it will return one simple message for dialogue box.Please provide sample for me to proceed. ...

jqGrid: replace single click with double click to enter cell edit mode

Using cell edit mode in jqGrid, the default behaviour is to enter edit mode on a cell whenever that cell is clicked or if that cell is selected and the enter key is pressed. Is there a way to change this behaviour so that a single click does not place it in edit mode but a double click does? Entering into edit mode on enter is fine. ...

how to implement photo gallary with slide show

I am developing a web application, I need a modern photo gallary using ajax or jQuery. ...

nyroModal Lightbox issue

I'm using the latest version 1.6.2 version of nyromodal lightbox jQuery.nyroModalSettings({title:'Manual Title'}); It wont refelect any title on the lightbox title remains empty. I also tried: jQuery.nyroModalManual({ title:'Manual Title' }); Nothing reflects. If anyone has an idea please put it forward, Gobi:) ...

jQuery open link in new window with small dimensions (NOT TAB)

I need to open certain links in a new window (NOT TAB) with certain dimensions. This will open a link in new tab: $(document).ready(function() { $('a[rel|=external]').click(function(){ window.open(this.href); return false; }); }); What to change in order to get links opening in new windows.? EDIT: This is my ...

jQuery, Injecting a clickable image

I am trying to solve a problem for a client where they want to dynamically inject an image into the page and have it call their js function when clicked. The script is included from our base js class to their site, so it's my code on their site essentially. I am very close to getting there, but I've found a strange issue in IE of all pl...

How to use jQuery selectors on jQuery wrapped arrays

Hi, I have an array filled with artificiality created option elements, the way I create them is the following: var daysArr = new Array(); for(i=1; i<=31; i++){ daysArr.push('<option value="'+ i +'">'+ i +'</option>'); } $(daysArr.join('')); What I'm trying to do is to use a selector on this array, like that: $(daysArr.join(''))...

How to make jQuery lighboxes (like fancybox) to display pictures faster?

At Officesnapshots.com I think they are using fancybox (check the closing button). But the pictures load damn fast. Is it really fancybox or another plugin? If it is fancyboxn how can I archieve the same speed as them? ...

Dynamic form with wysiwyg issues

Hello, I'm having issues with dynamic form with wysiwyg editor. I'm using FCKEditor (I'm forced to). From the begining, I create a cute form in Fencybox, working correctly. I'm having only one small isssue, form is not sending any value. According to documentation link text everything is implemented correctly. I'm trying to get editor...

jquery draggable: how to limit the draggable area?

Hi, I have a draggable object (div), and some droppable ones (table TD's). I want the user to drag my draggable object to one of those droppable TD's. I enable draggable and droppable this way: $(".draggable").draggable(); $(".droppable").droppable(); The problem is that with this the user can drag the div anywhere on the screen, inc...

Adding Counter to HTML Form and Calculate Credits

I have a simple HTML Form that allows the user to enter some text which is then sent as an SMS/TXT Message via an SMS Gateway. The user enters the message text into a textarea: <textarea rows="10" cols="40" id="smsbody" validate = "required:true" name="MessageBody"></textarea> They can enter as little or as much text as they like, how...

Scroll down at character number N in HTML

I can calculate an order of a character I would like to open a HTML page at. Is it possible (with jQuery) to write a script that will scroll down to a position of nth character in HTML markup? Let's say this is my HTML: <p>Hello</p> <p>Hello</p> <p>Scroll here</p> <p>Hello</p> How would I scroll down to 28th character in that HTML (...

Remove and add specific classes - Jquery.

I need to remove existing class of an element and add another class...or shortly I want to replace a specific class having letters 'border' as substring by another class with letters 'border' as substring. I have to toggle among 8 classes. I tried to select previous class like strClass=$("#"+styleTarget[class*='border']), but it failed. ...

How can I parse a HTML attribute value out of XMLHttpRequest.responseText?

The below JS function does Ajax request and retrieves HTML in obj.responseText. My issue is that I need to extract the value of id inside the span into notify_id var. I just don't know how to get that done. This is the HTML to lookup: HTML: <span id="1034"></span><img src="./images/icons/post_icon.png"> JS: function func() { ob...

JQuery handling multiple key presses in IE and Firefox

Hi, I'm working on handling the multiple key presses with jQuery. I have two handlers: 1. keyDownHandler 2. keyUpHandler keyDownHandler detects if the certain key has been pressed, if yes it sets a certain boolean value to true and carries on with the processing. keyUpHandler resets the boolean value to false. All this is required...

Simple way to monitor result of request to detect session timeout?

I've got an Ajax app I would like to add sessions and logins to. Currently the app uses jQuery get shorthand to send a request that.ajaxRequest = $.get(query_string, function(data, textStatus, xhr) { // do somthing with data }); I have a system on the server that throws an error message if the session has expired. On the client...

jquery check onload which radiobutton is checked

Hello, given following html <input id="IBE1_IBE_NurFlug1_RadioButtonList1_0" name="IBE1$IBE_NurFlug1$RadioButtonList1" value="Blue" type="radio"> <label for="IBE1_IBE_NurFlug1_RadioButtonList1_0">Blue</label> <input id="IBE1_IBE_NurFlug1_RadioButtonList1_1" name="IBE1$IBE_NurFlug1$RadioButtonList1" value="Green" checke...

Jquery ajax call within an each loop

Hi, I'm having a problem when using the jquery .each() and .ajax() functions together. I'm using .each() to loop through 5 elements and am performing the .ajax() call for each one. My problem is that I only want the loop to continue when a response has been received from each ajax request. Currently, all 5 elements are being looped, 5 ...

Creating an image randomly fails in IE only

When I create an image in jQuery, set i's attributs with .attr() and then wait for it to load with .load() before animating the script randomly stops in IE. It always fails before the .load(). Any help would be very much appreciated. Even a different way of doing things would be helpful. Thanks. $('<img />') .attr({ ...