logo
down
shadow

PrettyPhoto not work with livequery


PrettyPhoto not work with livequery

By : Zekri Anouar-Charif
Date : October 17 2020, 11:12 AM
Hope that helps Can anyone explain how to use PrettyPhoto with livequery? , Are you talking about jQuery? If so, I've gotten this to work:
code :


Share : facebook icon twitter icon
Can't seem to get Prettyphoto to work

Can't seem to get Prettyphoto to work


By : Raymund Reyes
Date : March 29 2020, 07:55 AM
this will help Been trying for hours now, can't seem to find the problem. http://sabinequardon.dk/poooort/index.html , You never invoke prettyPhoto...
code :
$(document).ready(function(){
  $("a[rel^='prettyPhoto']").prettyPhoto();
});
...
<head>
  <script src="assets/js/jquery-1.6.1.min.js" type="text/javascript"></script> 
  <script src="assets/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
  <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <script src="assets/js/jquery.quicksand.js"></script>
  <script src="assets/js/script.js"></script>
</head>

<body>
  ...
  <!---end of the body-->
  <script type="text/javascript">
  $(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
  });
  </script>
</body>
Jquery PrettyPhoto removing #prettyphoto from URL

Jquery PrettyPhoto removing #prettyphoto from URL


By : vbpkumar chinna
Date : March 29 2020, 07:55 AM
wish helps you I use version 3.1.4 of prettyphoto. (http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/). I want to remove "#prettyphoto[iframe]/number/" from URL. I've set deeplinking:false but this don't help. I've understood that it might be the problem from these functions: , a) This worked for me:
code :
function clearHashtag(){
    if(location.href.indexOf('#prettyPhoto')!==-1)
        location.hash="";
}
(function($){$.prettyPhoto={version:'3.1.4'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({.. deeplinking: false; ...}
prettyPhoto doesn't work with ASP.NET URL routing

prettyPhoto doesn't work with ASP.NET URL routing


By : user3690631
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I'm using prettyPhoto in my asp.net project. I have some issue. When i use url routing in my project, prettyPhoto doesn't work. Image opening on _self target (It doesn't seem as popup) If i don't use routing it's working fine. , My script tags were like below.
code :
<script src="js/jquery-1.3.2.min.js"></script>
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
/example.com/Details/SampleDetail/SampleTitle/js/jquery.prettyPhoto.js ...
<script src='<%= Page.ResolveUrl("~/js/jquery-1.3.2.min.js") %>'></script>
 <script src='<%= Page.ResolveUrl("~/js/jquery.prettyPhoto.js") %>' type="text/javascript"></script>
Jquery livequery 'click' doesn't work

Jquery livequery 'click' doesn't work


By : Hairltake
Date : March 29 2020, 07:55 AM
This might help you I've got a problem with my Jquery, the alert doesn't pop. , Change your selector to this:
code :
$('.grid4.text_center .bouton.btvalid.btlong250.validation')
$(document).ready(function() {
  $('.grid4.text_center .bouton.btvalid.btlong250.validation').livequery(function() {
    $(this).click(function() {
      var sTest = 'Click';
      alert('' + sTest);
    });
  });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="grid4 text_center" style="margin: 20px 20px 0px 0px;">
  <input value="Calculer" class="bouton btvalid btlong250 validation" type="submit">
</div>

<script>
  (function(factory) {
    if (typeof define === 'function' && define.amd) {
      define(['jquery'], factory);
    } else if (typeof exports === 'object') {
      factory(require('jquery'));
    } else {
      factory(jQuery);
    }
  }(function($, undefined) {

    function _match(me, query, fn, fn2) {
      return me.selector == query.selector &&
        me.context == query.context &&
        (!fn || fn.$lqguid == query.fn.$lqguid) &&
        (!fn2 || fn2.$lqguid == query.fn2.$lqguid);
    }

    $.extend($.fn, {
      livequery: function(fn, fn2) {
        var me = this,
          q;

        // See if Live Query already exists
        $.each($jQlq.queries, function(i, query) {
          if (_match(me, query, fn, fn2))
          // Found the query, exit the each loop
            return (q = query) && false;
        });

        // Create new Live Query if it wasn't found
        q = q || new $jQlq(me.selector, me.context, fn, fn2);

        // Make sure it is running
        q.stopped = false;

        // Run it immediately for the first time
        q.run();

        // Contnue the chain
        return me;
      },

      expire: function(fn, fn2) {
        var me = this;

        // Find the Live Query based on arguments and stop it
        $.each($jQlq.queries, function(i, query) {
          if (_match(me, query, fn, fn2) && !me.stopped)
            $jQlq.stop(query.id);
        });

        // Continue the chain
        return me;
      }
    });

    var $jQlq = $.livequery = function(selector, context, fn, fn2) {
      var me = this;

      me.selector = selector;
      me.context = context;
      me.fn = fn;
      me.fn2 = fn2;
      me.elements = $([]);
      me.stopped = false;

      // The id is the index of the Live Query in $.livequery.queries
      me.id = $jQlq.queries.push(me) - 1;

      // Mark the functions for matching later on
      fn.$lqguid = fn.$lqguid || $jQlq.guid++;
      if (fn2) fn2.$lqguid = fn2.$lqguid || $jQlq.guid++;

      // Return the Live Query
      return me;
    };

    $jQlq.prototype = {
      stop: function() {
        var me = this;
        // Short-circuit if stopped
        if (me.stopped) return;

        if (me.fn2)
        // Call the second function for all matched elements
          me.elements.each(me.fn2);

        // Clear out matched elements
        me.elements = $([]);

        // Stop the Live Query from running until restarted
        me.stopped = true;
      },

      run: function() {
        var me = this;
        // Short-circuit if stopped
        if (me.stopped) return;

        var oEls = me.elements,
          els = $(me.selector, me.context),
          newEls = els.not(oEls),
          delEls = oEls.not(els);

        // Set elements to the latest set of matched elements
        me.elements = els;

        // Call the first function for newly matched elements
        newEls.each(me.fn);

        // Call the second function for elements no longer matched
        if (me.fn2)
          delEls.each(me.fn2);
      }
    };

    $.extend($jQlq, {
      guid: 0,
      queries: [],
      queue: [],
      running: false,
      timeout: null,
      registered: [],

      checkQueue: function() {
        if ($jQlq.running && $jQlq.queue.length) {
          var length = $jQlq.queue.length;
          // Run each Live Query currently in the queue
          while (length--)
            $jQlq.queries[$jQlq.queue.shift()].run();
        }
      },

      pause: function() {
        // Don't run anymore Live Queries until restarted
        $jQlq.running = false;
      },

      play: function() {
        // Restart Live Queries
        $jQlq.running = true;
        // Request a run of the Live Queries
        $jQlq.run();
      },

      registerPlugin: function() {
        $.each(arguments, function(i, n) {
          // Short-circuit if the method doesn't exist
          if (!$.fn[n] || $.inArray(n, $jQlq.registered) > 0) return;

          // Save a reference to the original method
          var old = $.fn[n];

          // Create a new method
          $.fn[n] = function() {
            // Call the original method
            var r = old.apply(this, arguments);

            // Request a run of the Live Queries
            $jQlq.run();

            // Return the original methods result
            return r;
          };

          $jQlq.registered.push(n);
        });
      },

      run: function(id) {
        if (id !== undefined) {
          // Put the particular Live Query in the queue if it doesn't already exist
          if ($.inArray(id, $jQlq.queue) < 0)
            $jQlq.queue.push(id);
        } else
        // Put each Live Query in the queue if it doesn't already exist
          $.each($jQlq.queries, function(id) {
          if ($.inArray(id, $jQlq.queue) < 0)
            $jQlq.queue.push(id);
        });

        // Clear timeout if it already exists
        if ($jQlq.timeout) clearTimeout($jQlq.timeout);
        // Create a timeout to check the queue and actually run the Live Queries
        $jQlq.timeout = setTimeout($jQlq.checkQueue, 20);
      },

      stop: function(id) {
        if (id !== undefined)
        // Stop are particular Live Query
          $jQlq.queries[id].stop();
        else
        // Stop all Live Queries
          $.each($jQlq.queries, $jQlq.prototype.stop);
      }
    });

    // Register core DOM manipulation methods
    $jQlq.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove', 'html', 'prop', 'removeProp');

    // Run Live Queries when the Document is ready
    $(function() {
      $jQlq.play();
    });

  }));
</script>
How does .livequery() work when it only receives one parameter?

How does .livequery() work when it only receives one parameter?


By : Tu Zhi
Date : March 29 2020, 07:55 AM
I hope this helps you . It is irrelevant for me now because from now on I will use .on, since I upgraded jQuery.
Related Posts Related Posts :
  • JasperReports: How to pass parameter to subReport
  • Is there built-in web analytics tool in Liferay?
  • 'if' scenario in an equation. How do I implement it?
  • Uncaught [CKEDITOR.editor] The instance "html" already exists
  • Trimming variable in CLLE
  • Slot not being passed from action to layout in Symfony 1.4
  • Are there any disadvantages of using C# 3.0 features?
  • How to download paypal transactions using some API
  • Microsoft CRM could not log you on to the system. Make sure your user record
  • Good acceleration structure for ray sphere tests with spheres that move
  • Draw formatted rich text
  • How can I sum values in column based on the value in another column?
  • JBoss eventually stops responding to request, but no OOME
  • Prevent inline-block from wrapping on white-space: pre?
  • Neural Network Recommendation Engine
  • Getting the return value of an exec process
  • Dynamics CRM: Create users with specific GUIDs
  • Languages used to write programs for satellite-missions?
  • is it possible to use only two semaphores to synchronise three or more threads?
  • Opengl ES - drawing a plane of multiple vertices
  • Make Aptana never use Windows line endings
  • Stub property and save other behaviour
  • What would you call "callback" or "closure" in general?
  • Drag a bezier curve to edit it
  • Archive/Compress Command FTP Through Terminal?
  • how can I use curly braces in a mysql query?
  • or operator in vbscript
  • Using ms: xpath functions inside XPathExpression
  • How to add menu entry to "Run As"?
  • How can I make a single PyQt code to work in Windows and Linux?
  • NSFileSystemFreeSize
  • how we can i use google translator api in my website
  • Looking for a database of n-grams taken from wikipedia
  • how to map network drive for Clearcase View in Windows service?
  • What is the difference between machine independent and machine neutral?
  • DDD Business Model to Relational Model mapping
  • Source code version number policy
  • How to disable Caret Blinking?
  • Writing MS Word 2007 XML
  • Extension method to filter a list of concrete types based on interface?
  • Determining Opcode Cycle Count for a CPU
  • How to specify a fixed height for a SWT widget?
  • Does the iframe have any effect on page load time? Why not?
  • Twitter Streaming API Best Practices(Multiple or Single connection)
  • How to achieve effective democratic governance for an Open Source project?
  • Cross domain cookie reading/setting cross browsers
  • include existing youtube video in my own youtube account
  • Registering and using out-of-proc COM server in an isolated way (SxS)
  • How do i provide site resources in the parent for all children modules to use?
  • I/O in NASM programs in Windows 7
  • How to adapt the Specification pattern to evaluate a combination of objects?
  • JTree component in java swing
  • PostgreSQL: Log query only on error
  • Spec fails when run by mspec.exe, but passes when run by TD.NET
  • Castle Dynamic Proxy in Windsor Container
  • Kanbanish visualization and workflow management for multi-project, multi-team department
  • How to share code with continuous integration
  • Please recommend a complete guide/book on MVVM for silverlight
  • Does Compressed Sensing bring anything new to data Compression?
  • Exceptions with DateTime parsing in RSS feed in C#
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org