jquery

Replace paragraph by <br /> tag in div with contenteditable

How to put <br /> only in div contenteditable while user is pressing ENTER key? I must manage the content of that div in XML after send, but some browsers translate new lines as <p>, some (in example Google Chrome) as <div>. The good solution will be force to make new lines the same in all browsers (only <p> or only <div>) too. PS: I'm...

How to translate javascript-files in Pylons

Heya! We're making an application by using Pylons and JQuery. We have used standard way of making translations, but it doesn't quite work with javascript. The awkwardness of js-translation methods is that we should make duplicate processes for selecting languages etc. Is there a proper support in Pylons for javascript-translations? ...

Tab menu - jquery mouseover/mouseout problem

Hi, I am using the tab menu similar to http://yensdesign.com/tutorials/tabs/ but with hover instead of clicks. Currently i have to use 'default' to close the menus. How can I start off with all the drop menu's closed? When user hovers over the tabs the menu should expand and only close when user hovers out of the expanded menu. Query...

jQuery .bind is being executed more than once?

Original code: (can be seen working here: http://sandbox.hokuten.net/jqrpg/) /* google.setOnLoadCallback(function() { */ $(function() { jqr = new Object(); jqr.settings = new Object(); jqr.settings.sprite_width = 16; jqr.settings.sprite_height = 16; jqr.settings.space = false; jqr.p = new Object(); function jqrpgResetPlayer() { jq...

how can I select both label and input?

I have form containing several options like this: <label for="edit-attributes-2-29" class="option"> <input type="checkbox" class="form-checkbox" value="29" id="edit-attributes-2-29" name="attributes[2][29]"> Cajunkryddad biffstek, +30 Kr </label> I need to select the whole surrounding div(not included abov...

Problem with multiple jQuery slideshows

Basically i'm setting up a page with mutiple slideshows using the jQuery Cycle plugin. Each slideshow('.slideshow') has it own navigation in the form of a pager('.controls'). However everytime i click a pager icon all the slideshows obn the page fade to the next slide. How can I prevent this so that only the slideshow in question has the...

how to use jquery.validate plugin in cakephp form

My jQery code is: $(document).ready(function(){ $('#StudentRegisterForm').validate({ rules: { email: { required:true, email:true } } }); }); and in my form email: <td><?php echo $form->input('email',array('class required email')); ?></td> The problem is jquery validate plugin...

jquery tooltip hover help

I have a tooltip pulling in some Ajax content and want the tooltip to stay visible when the user hovers over the tooltip not just the original link. How would I achieve this extending the following code (function($){ $.fn.tooltip = function(options){ var defaults = { cssClass: "", //CSS class or classes to style the tooltip ...

Create extra tabs

hello, I'm working on this project, and i have this bar that will have tabs filled in it dynamically. What i want to do is have a (+) image that appears whenever the bar is full, and when the user clicks on it, the rest of the tabs will appear. Something like what facebook have in the profile page to add a new tab. Anyone knows an easy ...

How to enable ZendX integrated Jquery in Layouts.

I am trying to understand why ZendX_JQuery will not work when used directly in a layout. It works perfectly fine when in a view: creates the needed code puts the JQuery script in the head tag But when used inside the layout creates the needed code does not insert the JQuery script in the head tag Can this be overcome, and how? An...

jQuery, get Previous and Next element on Drag, based on parent

I am trying to create a timeline. There is a dragger element and some dynamically created timeframes (DIVs). When you drag the dragger the code will indicate what is the near left and near right div. The code works, you can see it at http://jsfiddle.net/3pXC9/15/ . Just drag the red handle, the blue dot is the left and the red is the rig...

Problem in submiting form using jquery

<script src="jquery-validate/lib/jquery.js" type="text/javascript"></script> <script src="jquery-validate/jquery.validate.js" type="text/javascript"></script> <script type="text/javascript"> jQuery.validator.addMethod("steam_id", function(value, element) { return this.optional(element) || /^STEAM_0:(0|1):[0-9]{1}[0-9]{0,8}$/.test(valu...

Is it possible to create a jQuery event that triggers when a scrollbar is released?

It's my first question on SO, so I hope I'm doing it right. Basically, I would like to know how would one go about creating a jQuery event that would trigger when a scroll marker is released if scrolling with mouse (and also when scrolling with keyboard). When searching the Internet I have found a special scrollstop event here that trig...

Can i get a meta value with jQuery/JS?

Hi all, Im struggling to find any information on getting meta values. I have a locale set in the meta on a few sites and would like to use a centralised js file so i need to grab the value from say for example <meta name="locale" id="locale" content="en_ZA" /> hmmmm.... Many thanks ...

jQueryUI dialog opens off screen in IE8

Whenever I open a dialog box in IE8 and the current page has vertical scrolls, the dialog box is opened off screen. For example: <body> <!-- This will be our button --> <div id="btntest" style="border:solid 1px; cursor:pointer;">Test button</div> <?php # 200 lines of blank spaces to show vertical scroll bars for($i = 0; $i < 200; $i++){...

How to mark required field in jQuery Validate

Hi I'm using jQuery Validate and xVal to validate in input forms. This works great. However, I do want to mark my required fields with an asterix (*) or something like that to show which field is actually required. I could do this by hand, but since I already generate my validation rules with xVal I thought I could mark the required fi...

How to remove them with jQuery GalleryView plugin?

Hi, I'm using the jQuery GalleryView plugin, and I want to remove the arrow that slides along the thumbnails when the transitions take place. I can't figure out how to remove this (tried using the 'nav_theme' configuration option but no luck). Does anybody know how this is done? ...

want to add a subgrid in struts2 jquery grid

I have two grids department and student. Now I want to show department grid always and whenever any row of that department grid is selected student grid will open at the bottom of the department grid with all the student data of that department. Can you help me on this. I am using struts2 and jQuery. Thanks in advance. ...

Dragging issue in DIV

In a DIV tag, I had appended a SPAN control by using the following script, at load $("#<%=divDimensions.ClientID %>").append("<SPAN id='spnDrag' class='draggable' style='CURSOR:hand'>" + $(ui.draggable).text() + "</SPAN><br>"); where "divDimensions" is the DIV control. And the jquery script I had wriiten for dragging the span control...

jquery plugin lava lamp not working in IE6

Am using jquery plugin Lava lamp that is not working in IE6 .....particularly at the mouse hover event.but it's working in firefox. Here is my code css file of lava lamp plugin .lavaLampWithImage { position: relative; height: 70px; width: 900px; /*background: url("bg.gif") no-rep...