jquery

jQuery UI - Droppable only accept one draggable

Hey there, I'm making an app, that is using one droppable div and a few draggable divs. How can I make the droppable to not accept more than one draggable div? I Googled, but didn't find any workaround. ...

What's the name of that lightbox script that has this Apple look & feel?

I believed jQuery had it, but now I see the lightbox of jQuery isn't the actual cool one. I'm talking about this light box in particular: http://tapbots.com/software/convertbot/ (click on the play video button, and the lightbox appears). They seem to use exactly the one I'm searching, but have modified some of the graphics. The origina...

WYSIWYG development bug with formatBlock in Mozilla

Hello, I'am currently developing a WYSIWYG editor for my CMS and got serious bugs here. After switching from IFRAME to DIV contenteditable the behavior changed dramatically. Using execCommand('formatBlock') to create headlines causes unwanted BR tags to the source code, but only in Mozilla. I thought the reason could be < br _moz_dirty...

Is there a way to break out of event recursion in jQuery without using a global variable?

I have a form with 2 text inputs and 2 span controls. Normally, when textbox A is changed an event is fired to change span A, and when textbox B is changed, an event is fired to change span B. However, in one particualar case I would like a change either textbox A or textbox B to update both span A and B. I tried wiring the events up to...

Keeps Update All Text And Not the selected text in jQuery

I have the following code iam trying to make the text div under the image editable by using keyup and using .val() but iam having a problem when i click on another image and edit the textbox to update the new image text they all change. $('.HeaderGifs').live('click', function() { var img_class = $(this).attr("class"); var img_src = t...

jquery: POST data + redirect page not working as expected

I'm trying to submit some data using POST method and redirect the page. But whenever I click on the submit button, the jquery does not load properly on the new page. I was able to reduce my problem to the following code. For example, If I press submit, a new page gets loaded. But Submit button doesn't give any response, and no alert box...

How to move images left and right in front or behind another Image Jquery

i have a list of images i need to be able to move them left and right (sortable) in jquery. I know I need to use Child Selector but can someone lead me down the right path to getting this working please. e.g so say i click id=1 and i want to move it below id="3" <div id="image_list"> <img src="test0.png" id="1"></img> <img ...

Jquery textarea val() doesnt take new line.

I get a textarea with a keyup function attached. When the user type something, I want this text to be rendered inside the blockquote tag. It works, but id doesn't take the newline and spaces. Can you helpe me? $('#post_body').keyup(function() { $('blockquote').find('span').text($(this).val()); ...

Javascript - follow link, copy URL and change original?

Hi all, I don't know if this is even possible in Javascript as am pretty new to it, but hopefully someone will be able to help! I want some Javascript (ideally jQuery) that will follow all the links with a certain word in on a page and then on the next page, there will be a link to an image. I want to copy that link and then go back a...

how to get dynamically created textarea's value in POST array ?

Hi All, I am creating few textareas on-the-fly by replacing the content and adding that content in textarea. Please review the code below: <script type="text/javascript" language="javascript"> $(document).ready(function(){ $("#content").find(".editable").each(function(count){ var content = $(this).html(); ...

How to bring the close(x) button of jQuery Tools Overlay to the left?

I'd like to use this jQuery plugin: jQuery Tools: Overlay effect It shows a light box in mac style with a black+white x-circle to close it. But it's on the upper right. Since my audience are Mac users, that would suck. How could I reposition that close-x icon to the left of the light box so that the usability doesn't get hurt? ...

How to find some certain event handlers with jQuery?

As many browsers do not show tooltips on disabled form elements (as Opera does), I decided to emulate disabled button with jQuery. When disabling I just set control's class to disabled and for buttons/submit controls I add an event handler click(function(){return false;}) and I can unbind it later when reenabling the control. Now the ...

Jscrollpane: Is the function scroll 200px possible with horizontal scrollbar?

I tried doing it like in the vertical example but could not get that to work. So what I have is a div with a horizontal scrollbar in it with a lot of pictures in it. I now want to make a button that if clicked will scroll +200px or something like that. Is this possible and where do I start? Couldn't find anything on google or here... ...

Cycle animation

<div class="wrapper"> <div class="img">image on background</div> </div> .wrapper { position: relative; } .img { position: absolute; left: 0; top: 0; background: url(image.png); } .img block must be cycle animated, it should travel from left point of .wrapper to right and then back. There should be 2 seconds pause, before it will ...

jquery not working in IE

Hello, I have some very simple code: $(document).ready(function(){ $('#module_body_News').height(0); }); This works fine in Firefox but not in IE. Why? ...

What is the means of terms "Building Block" in javascript?

for example title of this article is "The JavaScript Building Blocks: Data Types, Literals, and Variables" http://www.informit.com/articles/article.aspx?p=169501 What is the means of terms "Building Blocks" in JavaScript? Is it related to box on web-page, CSS box model? ...

Pass parameter to jQuery SimpleModal using ASP.NET

I am beginning to use SimpleModal in my ASP.NET project. I am starting with the demo code provided on the SimpleModal site. I have a page that renders images using a ListView control. When I click on one of the images - I use SimpleModal's demo code to bring up a modal window showing details on the image I clicked. For now, I have ha...

Auto-submitting a form with jquery

I have the following form. And the form works. Now I want to auto-submit the form when I select one of option. <div id='weeksubmit'><!-- I don't need this div --> <form action="http://localhost/myapplication/index.php/courses/admin/index" method="post" class="autosubmit"> <label for='weekid'>Select Week</label> <select name="weekid"> <...

show loading icon in div with jquery

I have a div tag like so <div id="mainHolder"> <span>asjlkdasjdka</span> <img src='image.jpg' /> <input type="button" id="myButton" value="Click me" onclick="callWcf();" /> </div> I am using jquery for my client side development and clicking the button in the div will do some server side processing. I have callWcf function makes th...

Javascript , jQuery - what have I done wrong?

$(document).ready(function () { $("href").attr('href', 'title'); }); $('a[href$=.jpg]').each(function () { var imageSrc = $(this).attr('href'); var img = $('<img />').attr('src', imageSrc).css('max-width', '300px').css('max-height', '200px').css('marginBottom', '10px').css('marginTop', '10px').attr('rel', 'lightbox'); $(...