You can use the "handle" option of the sortable. In this case it would
look like this:
$(".column").sortable({
handle: '.portlet-header',
connectWith: ['.column']
});
--
Bohdan Ganicky
On Jan 20, 1:01 pm, shmuelzon wrote:
> hey,
>
> i'm new to the whole jQuery scene, and i'm tr
Hello,
maybe it could be easier to use the good old DOM in this scenario:
var textNode = $('#testText').get().firstChild; // now we have the
textNode
var textRaw = textNode.nodeValue; // now we have the text string with
all the white-space around
var text = $.trim(textRaw); // we strip the trail
http://www.learningjquery.com/2008/10/1-awesome-way-to-avoid-the-not-so-excellent-flash-of-amazing-unstyled-content
On Nov 29, 2:42 pm, Andrew wrote:
> Hi
>
> I've got the treeview plugin set to be collapsed on load. This works
> generally, but every now and then, the page loads and the tree app
Hi, you can try the .filter(fn) method:
$('#LHNav li').filter(function() {
return !$(this).children('a').length;
}).bind('click', function (){...});
--
Bohdan Ganicky
Hi Bob O,
can you provide us the html sample you're working on?
--
Bohdan Ganicky
Awesome, I was just looking for such functionality recently. :)
Thanks!
--
Bohdan Ganicky
On Sep 2, 2:09 am, num <[EMAIL PROTECTED]> wrote:
> My proof of concept
>
> http://www.overset.com/2008/08/30/animated-sortable-datagrid-jquery-p...
>
> I haven't yet seen html scrolling animation like thi
Hi Andrea,
it's really a matter of true or false. The attr() method returns a
string and so if it returns an empty one, it's evaluated as false and
the part after the "||" operator is then taken. You use jQuery wrapper
on both sides of the "||" operator and jQuery wrapper always returns
something
Karl is completely right. But if you REALLY have a reason to check for
its existence you can do this:
if ($('#myId').length) {
$('myId').remove();
} else {
alert('ooops! there's no myID to remove...');
}
--
Bohdan Ganicky
On Aug 18, 10:11 pm, "Gewton Jhames" <[EMAIL PROTECTED]> wrote:
> The
Hi Daniele,
at the time you're attaching the click event, the paragraph has no
class and thus it will accept the click event (which then works
"forever"). You have to rebind all the events after the DOM has been
changed.
There's some interesting reading about events on Karl Swedberg's
famous web
Hi Aaron,
it's really better to use CSS. Use percents for layout and you have
exactly what you need. You can then use the max-width property to
prevent spreading the page layout in an extreme resolution scenarios.
There's a hack that makes it work even in the prehistoric IE6 browser:
http://www.c
Hi zephyr,
try this:
...
$('p.firstLine').click(function() {
var $el = $(this).next();
$el.slideToggle('slow');
});
...
--
Bohdan Ganicky
On Feb 23, 6:28 pm, zephyr <[EMAIL PROTECTED]> wrote:
> Hi,I cannot get my finger behind this one:
>
> I have this HTML:
> This is the first line of
Vim ...for everything
http://www.vim.org/index.php
--
Bohdan Ganicky
On Feb 13, 5:38 pm, Feijó <[EMAIL PROTECTED]> wrote:
> I changed my own a few weeks ago, now I'm using Editpad++
> (http://sourceforge.net/projects/notepad-plus/)
> its freeware, nice resources, like macros, quick-text, high
Hi Eridius,
I guess this could do it:
$('#' + self.options.auto_complete_id + ' li').each(function(i) {
// i is now an index
$(this).bind('mouseover', function() {
//do something on mouseover
});
});
--
Bohdan Ganicky
On Feb 5, 2:15 pm, Eridius <[EMAIL PROTECTED]> wrote:
>
Oops!
Mea culpa! next() and prev() gets only the very next/prev siblings.
Next iteration (now tested ;)):
$('#eventlist a.boldFont').nextAll('a:first').trigger('click');
$('#eventlist a.boldFont').prevAll('a:first').trigger('click&
Hi,
try this:
$('#eventlist a.boldFont').next('a').trigger('click');
$('#eventlist a.boldFont').prev('a').trigger('click');
--
Bohdan Ganicky
On Jan 31, 4:26 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hallo,
>
> I am quite new to Jquery and so please forgive me if my problem sounds
Hi vitto,
are you sure that the problem isn't somewhere else? Link would be
fine...
Anyway, I have a tip for you. What about to make this a oneliner:
$('a.ppt, a.pdf, a.allegato, a.doc, a.jpg, a.xls, a.external,
a.zip').attr('target','_blank');
--
Bohdan Ganicky
On Jan 31, 3:46 pm, hcvitto <[
Hi Raymond,
I'm not sure if this is less cpu intensive, but at least it's more
jQuery:
$('div.box').each(function() {
var $snippet = $(this).find('dd p').html();
$(this).append('' + $snippet +
'');
});
--
Bohdan Ganicky
On Jan 24, 12:01 am, Raymond <[EMAIL PROTECTED]>
wrote:
> I was wonder
Hi DoZ,
try the neat jQuery Cycle plugin: http://www.malsup.com/jquery/cycle/
--
Bohdan Ganicky
On Jan 23, 7:11 pm, DoZ <[EMAIL PROTECTED]> wrote:
> Hi all!
> I "simply" need to build an image rotation/cycle; it has to be
> vertical, automatic, "looping", and the images have to be in tags.
>
>
Hi again,
in the previous post I put "img" to the children() method. Of course
it should be "a"...
--
Bohdan Ganicky
On Jan 22, 11:55 pm, Jayzon <[EMAIL PROTECTED]> wrote:
> Hi!
>
> To get this right, I'll post the html-part first:
>
>
>
>
>
Hi Jayzon,
$(document).ready(function(){
$("a.email").hover(
function () {
$
(this).parent().siblings("div.memberpic").children("img").css({"margin-
left":"-210px"});
},
function () {
$
Hi Stefan,
try this one: http://plugins.jquery.com/project/color
--
Bohdan Ganicky
On Jan 21, 1:21 pm, "Stefan Kilp [sk-software]" <[EMAIL PROTECTED]>
wrote:
> hi,
>
> what is the best way to animate background-color with jquery.
>
> i tried
>
> $j(this).animate({backgroundColor:"#ff"}, 200
Hi Jesper,
you might be interested in this: http://dev.jquery.com/ticket/2164
--
Bohdan Ganicky
On Jan 17, 11:00 am, "Jesper Rønn-Jensen" <[EMAIL PROTECTED]> wrote:
> I made a script that makes a div clickable by selecting all class="click"> and setting the onclick event to go to the href of a
Anyway, the answer is:
location.href = $(this).find('p a:last')[0].href;
--
Bohdan Ganicky
On Jan 17, 11:00 am, "Jesper Rønn-Jensen" <[EMAIL PROTECTED]> wrote:
> I made a script that makes a div clickable by selecting all class="click"> and setting the onclick event to go to the href of a
> li
Hi again,
I guess you should try something like this:
if (jQuery.isFunction(jQuery.datepicker)) {
...
}
--
Bohdan Ganicky
On Jan 14, 3:14 pm, "Dan Eastwell" <[EMAIL PROTECTED]> wrote:
> Thanks Bohdan,
>
> That sounds like it should work, but
>
> if(jQuery.isFunction(datepicker())){
>
Hi Josh,
don't try to reinvent the wheel here. Just use the jQuery http://docs.jquery.com/Traversing/add#expr";>.add() method:
var $divs = $('div#first,div#second');
...
$divs = $divs.add('div#third');
--
Bohdan Ganicky
On Jan 10, 8:32 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> I'm havin
Well, let's take a look on your jQuery code:
$(document).ready(function() {
$('div.image-wrapper').find('div.menu-details').hide() // well, this
works fine, even if I don't get why you use class instead of id to
locate the menu-details (you have the id="menu-details" in the markup
as well)
Hi Josh,
don't try to reinvent the wheel here. Just use the jQuery http://docs.jquery.com/Traversing/add#expr";>.add() method:
var $divs = $('div#first,div#second');
...
$divs = $divs.add('div#third');
--
Bohdan Ganicky
On Jan 10, 8:32 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> I'm havin
Hi Josh,
don't try to reinvent the wheel here. Just use the jQuery http://docs.jquery.com/Traversing/add#expr";>.add()
method. :)
var $divs = $('div.first,div.second');
...
$divs = $divs.add('div.third');
--
Bohdan Ganicky
On Jan 10, 8:32 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> I'm ha
I think that what you need is a callback function. Something like
this:
$('#old_stuff').fadeOut('slow', function() {
$('#new_stuff').fadeIn('slow');
});
Now #new_stuff appears only after #old_stuff faded out. I hope it's
clear enough.
--
Bohdan Ganicky
On Dec 30, 4:38 am, "[EMAIL PROTECTED]"
Hi,
is $.post() always returning string as response data?
$.post(url, { param1: value, param2: value }, function(data) {
alert(typeof data); --> string
}
Even if the data is JSON?
Do I have to use $.ajax() instead?
Thanks for your help.
Bohdan
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Rate_me:_Using_Ajax
...the second example. Is this what you're looking for?
--
Bohdan
On Jun 14, 3:42 pm, Tom Holder <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have some xhtml in my page with images that have certain events. A
> click
want.
>
> One of the great things about jQuery, however, is the basic concept.
> If it doesn't find the element it doesn't do anything so there is no
> need for conditional logic ;)
>
> On May 29, 12:22 pm, besh <[EMAIL PROTECTED]> wrote:
>
> > Hi
Hi all,
before jQuery, I was used to check for existence of certain elements
like this:
if (!document.getElementById('myElem')) {
return false;
} else {
doSomething();
}
Is there some jQuery way of doing this, or should I use the old DOM
one?
Thanks!
Bohdan
Hello Adrain,
have you tried something like this?
$('div').not('.myClass')
This will get all divs on a page except those with class .myClass.
Bohdan
34 matches
Mail list logo