jquery

What's the pattern for a JSONP method that was initiated from a jQuery plugin?

I'm writing a jQuery plugin to render data retrieved from another domain in an element on the page. I follow the typical pattern for my jQuery plugin: $(selector).Plugin(options); In the plugin I get external data using jQuery.getScript(url, [success]). The external data source allows me to define the name of a method and it will wrap...

Insert span next to textbox using jquery

Hello All I have a text box. i want to insert <Span>Invalid value</span> next to that text box using Jquery. Just like when we use validation,It will come next to textbox or else. ...

Javascript: setTimeout() - help needed

Hi guys, I'm currently doing a highlighting function on a webpage and im using the jquery plugin for that. My code looks like this: var input = function() { var matchword = $('#searchbox').val(); if(matchword != "") { $('body').removeHighlight(); $('body').highlight($('#searchbox').val()); } } $(do...

How can I call javascript function when DIV position is change ?

Hello everyone, I need to call javascript function when div position is changed.how can I achieve that event of changed div position ?. any idea ? ...

Get id from a one div to another div

Hello Here are the two divs <div id="1"> <span id="a1">first</span> <span id="a2b">first</span> <span id="a3">first</span> </div> Click <div id=2></div> And the jQuery code to do $('#2').bind('click',function(){ var xx = $('#a'+i).attr('id'); $('#2').append(xx); i=i+1; }); It ...

jQuery ajax.load div, then have parent container access property

So I have a tabbed ui "form", each tab is quiet complicated so it is loaded via the .load('item.html'); command. All good, when the user clicks to a different tab, I want to read a property, maybe execute a function from within the ajax loaded div. What is the best way to get to these properties and methods from outsite the ajax loade...

Jquery, Javascript and Observer Pattern

Im tring to use the observer pattern in javascript with JQuery, but the trigger and bind doesnt work. How may i do it to get the "alert('notify binded');" run? thanks ;) (function($){ var NoteApp = function(){ var self = this; this.notifications = []; this.EVENT = { NOTIFY: 'notify' };...

Create a row of li's, give last one the classname "last" and put them all in an ul

Hi, how do I create a list of li's (they look like simple boxes by using css and float left) with the certain specifications: 7 li's in a row the row is a closed ul-tag at the end there should be 8 rows of ul's the last li (the 7th) should have the class="last". this is what i got so far, to create li's through an array (i need an...

jquery ui multiple sliders and their values during form validation

Hello everyone I m setting up 5 sliders using jQuery UI in a form like this: $(".slider").slider({ step: 1, min:0, max:10, value: 5, start: // start logic, slide: function(event, ui) { //slide logic }, stop: function(event, ui) { //stop logic } }); The sliders are part of a form with other fields like name, emai...

Rounded corners on Divs. Problem with Internet Explorer only!

Has anybody experienced any problems with creating rounded corners on Divs? I am using the jQuery plugin from http://jquery.malsup.com/corner/ The problem is that the top corners are not rounding in Internet Explorer. Works fine with Firefox! Anybody got any advice? Here's my code: <script type="text/javascript"> $(document)...

IE6 https security message appearing after closing jQuery colorbox overlay

I am working on a secure site, https. I am using the colorbox jquery plugin to iframe another page from the same site over the current content. In IE6 when i close the colorbox overlay i get the following message: "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?" Any ideas why this is ...

jQuery Accordion Focus

Hello, This is my first post so let me know if you would like more information! I am using a select list and a jQuery accordion. When the user selects a value from the list it opens up the relevant part of the accordion using the activate method. This works fine apart from it also focusses the window on the accordion rather than leavi...

Add handler multiple times in jquery

How does jquery handle event assignment when it comes to assigning the same handler multiple times? Let's say I have <div class="draggable">Some Text</div> Are there any side effects (performance or otherwise) from calling the following multiple times? $('.draggable').draggable(); ...

JQuery UI Draggable - How to know an element is draggable initialized ?

My logic is if( !this.draginited() ) // a drag-disabled element shouldn't get pass here, as it is inited this.draggable({...}) I searched a lot and couldn't find a way to implement this logic, any ideas? ...

Attach an HREF and a class to an img link generated by the PhotoSlider script?

Hi folks, I'm using the very nice PhotoSlider script from http://opiefoto.com/articles/photoslider to create a slide show of images for one of my clients. This script replaces a previous hand-coded Javascript solution that allowed for the large image to be clicked resulting in a lightbox modal popup showing the full-size version of the...

clickoutside of live selector

I want to use the live method to hide an element if the user clicks anywhere on the page outside of that element. It is exactly like what clickoutside plugin does, but with ajax loaded elements. Any ideas on how to do this? ...

How do I get the id of the selected node in jsTree?

How can I get the id of the selected node in a jsTree? function createNewNode() { alert('test'); var tree = $.tree.reference("#basic_html"); selectedNodeId = xxxxxxxxx; //insert instruction to get id here tree.create({ data : "New Node Name" }, selectedNodeId); } ...

JQuery Simple Modal OSX Multiple dialogs

HI, I'm planning to use the jquery Simple modal for login and registration on my project site. i tried to have 2 modals as mentioned here. but im still unable to make it work. here is my code jQuery(function ($) { var OSX = { container: null, init: function () { $("a.osx").click(function (e) { e.preventDefa...

jQuery Rich Text Editor (RTE)

Which is the good Rich Text Editor (RTE) in jQuery ? which make best use of jQuery and easy to implement. Thanks in advance ...

javascript regular expression select html element with class="product" from string

lets say i use jquery.get to retrive a website to string and how am i gonna select the whole table with class=product from it? $() seem cant work on string .... ...