Results 1 to 4 of 4

Thread: jQuery Featured Listings conflict with my plugin

  1. #1
    Thread Starter
    libertalia's Avatar
    Join Date
    Jan 2013
    Location
    France
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts

    jQuery Featured Listings conflict with my plugin

    Hi all ,
    I have a small problem.
    I use jQuery with my plugin. My plugin displays a small map with a link "Enlarge map" which expanded the map (The expansion of the map is done with jQuery).
    My problem is the following :
    - when I call jQuery, list ads in "Featured Listings" disappear.

    I do not know how to solve this problem, I tried to use the function
    "jQuery.noConflict()", but it does not work.

    If it can help, here is a part of my code :
    function open_google_map_adresse(){
    echo '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    <script type="text/javascript" src="http://code.google.com/apis/gears/gears_init.js"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=geometry&amp;sensor=false"></script>

    //Call to jQuery
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>


    <style type="text/css">

    #fade { /*--Mask opaque black background--*/
    display: none; /*--hidden by default--*/
    background: #000;
    position: fixed; left: 0; top: 0;
    width: 100%; height: 100%;
    opacity: .80;
    z-index: 9999;
    }
    .popup_block{
    display: none; /*--hidden by default-*/
    background: #fff;
    padding: 20px;
    border: 20px solid #ddd;
    float: left;
    font-size: 1.2em;
    position: fixed;
    top: 50%; left: 50%;
    z-index: 99999;
    /*--Different definitions in CSS3 Box Shadow--*/
    -webkit-box-shadow: 0px 0px 20px #000;
    -moz-box-shadow: 0px 0px 20px #000;
    box-shadow: 0px 0px 20px #000;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    height: 600px;
    }
    img.btn_close {
    float: right;
    margin: -55px -55px 0 0;
    }
    /*--Manage the position fixed for IE6--*/
    *html #fade {
    position: absolute;
    }
    *html .popup_block {
    position: absolute;
    }

    </style>

    ';



    }


    function map_position_google_map_adresse($adresse,$options= null){
    if($options!=null) extract($options);
    if(!isset($width)) $width="800px";
    if(!isset($height)) $height="800px";
    if(!isset($zoom)) $zoom=6;
    if(!isset($type)) $type='HYBRID';
    if(!isset($latitude)) $latitude=40.69847032728747;
    if(!isset($longitude)) $longitude=-73.9514422416687;
    if(!isset($localize)) $localize=true;
    if(!isset($marker)) $marker=true;
    if(!isset($markerIcon)) $markerIcon='http://google-maps-icons.googlecode.com/files/home.png';;
    if(!isset($infoWindow)) $infoWindow=true;
    if(!isset($windowText)) $windowText='My position';

    //Affichage de la map

    //if($width == "250px" && $height=="250px")
    //$map = "<!-- <a href=\"#?w=590\" rel=\"map_canvas_2\" class=\"poplight\">Around you</a> -->" ;

    $map.= "<div id=\"map_canvas\" style=\"width:".$width."; height:".$height."\"></div>
    <div id=\"map_canvas_2\" class=\"popup_block\" style=\"width:600px; height:590px\" ></div>
    "
    ;

    $map .= "
    <script type='text/javascript'>

    $(document).ready(function() {

    // When you click on a link POPLIGHT class and the href starts with #var onLoad = true;
    $('a.poplight[href^=#]').click(function() {

    var currCenter = map_popup.getCenter();


    var popID = $(this).attr('rel'); // Find the corresponding pop-up
    var popURL = $(this).attr('href'); //Find the width in the href

    //Récupérer les variables depuis le lien
    var query= popURL.split('?');
    var dim= query[1].split('&amp;');
    var popWidth = dim[0].split('=')[1]; //The first value of the link

    //Make the pop-up appear and add the close button
    $('#' + popID).fadeIn().css({
    'width': Number(popWidth)
    })
    .prepend('<a href=\"#\" class=\"close\"><img src=\"close_pop.png\" class=\"btn_close\" title=\"Fermer\" alt=\"Fermer\" /></a>');

    //Margin recovery, which will center the window - it adjusts 80px in accordance with CSS
    var popMargTop = ($('#' + popID).height() + 80) / 2;
    var popMargLeft = ($('#' + popID).width() + 80) / 2;

    //On affecte le margin
    $('#' + popID).css({
    'margin-top' : -popMargTop,
    'margin-left' : -popMargLeft
    });

    //Fade-in effect of the opaque background
    $('body').append('<div id=\"fade\"></div>'); //Addition of black opaque background
    //Apparition du fond - .css({'filter' : 'alpha(opacity=80)'}) //to fix bugs in IE
    $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();

    google.maps.event.trigger(map_popup, 'resize');
    map_popup.setCenter(currCenter);

    return false;
    });

    //Close the pop-up and background
    $('a.close, #fade').live('click', function() { //When clicking on the button or the layer ...
    $('#fade , .popup_block').fadeOut(function() {
    $('#fade, a.close').remove(); //...they disappear together
    });
    return false;
    });
    });
    }



    Thank you in advance for your answers

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,100
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  3. #3
    Thread Starter
    libertalia's Avatar
    Join Date
    Jan 2013
    Location
    France
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    libertalia's Avatar
    Join Date
    Jan 2013
    Location
    France
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: January 23rd, 2012, 11:48 AM
  2. Featured carouselle removal/ plugin conflict?
    By aggieoutlaw8 in forum ClassiPress General Discussion
    Replies: 5
    Last Post: June 9th, 2011, 06:10 PM