MyBB Community Forums

Full Version: problem using jquery, please help :(
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi masters i have a big problem..
the last week i have installed a script in the <head> of the threads (in the "showthread" template), like this:

Quote:<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}

<script type="text/javascript">
var quickdelete_confirm = "{$lang->quickdelete_confirm}";
</script>
<script type="text/javascript" src="jscripts/thread.js?ver=121"> </script>
<script type="text/javascript" src="jscripts/jquery.js"></script>
<script type="text/javascript" src="jscripts/main.js"></script>

<style>
/* */

#preview{
position:absolute;
border:1px solid #ccc;
background:#333;
padding:5px;
display:none;
color:#fff;
}

/* */
</style>


</head>
<body>................
(in green the new scripts and style lines)


Well, all works good, but then I see that this script makes that the thread.js script don´t works Confused
For example, the multiquote and quickedit don´t works.
And when i descativate the new scripts the thread.js works fine.

can you help me please, how i can do for the scripts don´t make interferences in the other?

---------------------

I leave you the script download and tutorial for this works fine:
http://cssglobe.com/post/1695/easiest-to...ing-jquery
example: http://cssglobe.com/lab/tooltip/02/


thanks Sad
http://community.mybboard.net/thread-45115.html

there is another recent thread about this incompability I think
ok aglioeolio, I see the "jQuery.noConflict()." solution.. but how I can programate this function for my "showthread" template

This is a post I´ve see but i don´t understand how this wrok.. somebody can help me please? Sad

(2009-02-14, 09:36 PM)Imad Jomaa Wrote: [ -> ]
(2009-02-14, 09:14 PM)Tom.M Wrote: [ -> ]Prototype is a heavyweight compared to jQuery - everyone with a well informed opinion knows that. When 1.4 was developed, jQuery was just starting as a library, and Prototype was the most popular back then. That is why it's developed with it (or at least, that's what I remember people saying!).

Why not just include the jQuery library after the Prototype library, and use

jQuery.noConflict();

You can then use jQuery as a command ( jQuery("#target").attr("title"); ). This is probably the preferred way, especially if you're using Prototype and developing something that is cross-platform.

http://docs.jquery.com/Using_jQuery_with..._Libraries

Precisely. You really don't need a long work around, just use the noconflict and it works fine with MyBB.