Thursday, December 31, 2009

Re: [jQuery] Re: simplemodal next/back functionality

On Thu, Dec 31, 2009 at 2:13 AM, nevgenevich <nevgenevich@gmail.com> wrote:
>
> it generates the link properly, when clicking on it: it closes the
> modal but does nothing else. i can verify with a console.log that it
> gets to after the call to open the previous modal, but it doesnt open
> anything..... checked to make sure it was generating the modal link
> correctly too (ie calling the correct id)

It works fine for me. Here's the full page I used to test:

<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="Stylesheet"
href="http://yui.yahooapis.com/3.0.0/build/cssreset/reset-min.css" />
<style>
body { padding: 100px; }
div.Bar { display: none; }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="jquery.simplemodal-1.3.3.min.js"></script>
<script>
$(function()
{
$('a.Foo').each(function()
{
$(this).click(function()
{
$('#modal_' + this.id).modal({overlayClose:true});
});
});

var num_divs = $('div.Bar').length;

$('div.Bar').each(function(i)
{
/* if there is a previous div add a link to it
*/
if (i > 0)
{
/* get the ID for previous div
*/
var prev_id = $(this).prev('.Bar').attr('id');

/* add the link with click event
*/
$('<a href="#" class="Prev">previous</a>')
.click(function()
{
$.modal.close();
$('#' + prev_id).modal({overlayClose:true});
})
.appendTo($(this));
}

/* if there is a next div add a link to it
*/
if (i < num_divs - 1)
{
/* get the ID for next div
*/
var next_id = $(this).next('.Bar').attr('id');

/* add the link with click event
*/
$('<a href="#" class="Next">next</a>')
.click(function()
{
$.modal.close();
$('#' + next_id).modal({overlayClose:true});
})
.appendTo($(this));
}
});

});
</script>
</head>
<body>

<ul>
<li><a href="#" class="Foo" id="one">one</a></li>
<li><a href="#" class="Foo" id="two">two</a></li>
<li><a href="#" class="Foo" id="three">three</a></li>
<li><a href="#" class="Foo" id="four">four</a></li>
<li><a href="#" class="Foo" id="five">five</a></li>
</ul>

<div class="Bar" id="modal_one">Modal one</div>
<div class="Bar" id="modal_two">Modal two</div>
<div class="Bar" id="modal_three">Modal three</div>
<div class="Bar" id="modal_four">Modal four</div>
<div class="Bar" id="modal_five">Modal five</div>

</body>
</html>

[jQuery] Re: animate() not working for opacity in IE

This filter property is causing your problem, just remove it...
You can see here, if you just set the opacity, it'll work fine even in
IE...

http://vidasp.net/jquery-example4.html

Re: [jQuery] jquery.js and jquery-1.2.6.pack.js conflict

You should only load one of those files. The version included with
jCarousel is there as a convenience. It's not necessary to use it if
you already are loading jQuery. It's likely the unpacked version is
newer, anyway.

On Thu, Dec 31, 2009 at 7:21 AM, Mr.Aaqib <mr.aaqib@gmail.com> wrote:
> Hi,
>
> Recently i created menu and image gallery. I used jquery.js for menus
> and for image gallery i used jquery-1.2.6.pack.js as provided by
> carousels galleries. Now both of them does not work at same time. If i
> include both file image gallery script generates error message and if
> i remove the menus jquery.php file menus does not work but image
> gallery works as expected.
>
> I dont know whether its version conflict or something else. Any help
> will be highly appreciated.
>
>
>
>
> Regards
> Aaqib Iqbal
>

[jQuery] Re: jQuery + OOP + AJAX

On Dec 31, 4:25 am, fran23 <f...@lavabit.com> wrote:
> the target variable in your sample code has a $-prefix ($target). I think
> this is just an eye-catcher for variables - a similar coding to php. If not
> - if it has to do with something special in Javascript or jQuery - please
> let me know ...

"$" is just a regular character in variable names. Many jQuery users
will use it to visually distinguish variables representing jQuery
collections from DOM elements or other JS variables. Just a reminder
to myself.

-- Scott

Re: [jQuery] slow pop-up on IE8

Yes, there is something in jquery.cluetip that will cause this. It binds event handlers to every single element you specify in the selector. The clueTip plugin is not a viable solution for thousands of tooltips on a page. 

I recently wrote a series of posts on learningjquery.com about one way to handle such a large number of tooltips. Here is the latest n the series:




--Karl

____________
Karl Swedberg




On Dec 31, 2009, at 8:04 AM, Tarha Kettunen wrote:

Hello

If I have lot off (3000) pop-ups on single page, IE8 will freeze.
Firefox is doing fine. Is there something in jquery.cluetip.js that
could cause this, or should I contact Microsoft?

[jQuery] getJSON Problem

Hi folks, I've got an issue with the getJSON command. It's all
working fine apart from if the map data contains < followed by a
letter. If there is a space in there, "< a" for example, or a number
"<1" it is fine, but with "<a" the getJSON command either doesn't
execute or executes but does nothing, maybe calling a bad URL. Is
this a known issue, if so is there anything (apart from inserting a
space after the <) I can do to fix it?

Cheers

MH

[jQuery] slow pop-up on IE8

Hello

If I have lot off (3000) pop-ups on single page, IE8 will freeze.
Firefox is doing fine. Is there something in jquery.cluetip.js that
could cause this, or should I contact Microsoft?