Showing posts with label Jquery. Show all posts
Showing posts with label Jquery. Show all posts

Thursday, December 17, 2009

Magento VS Prestashop

In this days of Open source ecommerce, After the power Magento, I got to know of another opensource ecommerce shopping cart software which seemed to inline with Magento’s principles of offering a top-notch ecommerce software for free and I have had the pleasure to test drive – and install in production environment – Prestashop, a simpler alternative, that serves ecommerce with a nice ajax animated shopping cart and various interesting features.

1)      Prestashop and Magento both e-commerce solutions are available under Open Software License (OSL).

2)      Prestashop Installation requirements are Depends on GD library of PHP. For magento installation need a lot of extensions like PDO, CURL etc…

3)      As per as functionality concern functional features like Customer groups ,Wish list, product comparison, RSS feed, TAG in magento e-commerce. Multiple store control is also a powerful feature of magento.  On the other hand statistics and membership these two functional features are available in prestashop e-commerce. For more functionality and features you can also hire magento programmer.

4)      There are not proper shipping and payment modules or any label printing option in prestashop. Magento contain all these features.

5)      Prestashop adopt smarty template engine based on PHP 5. If you see the code of prestashop you can find the code is much more, for it adopts smarty template, and increase the workload of extending development. Magento adopt Zend framework, not smarty template engine. For the programmer who is making extending development, they not only need to master PHP, but also need to handle Zend framework.

6)      Prestashop’s create impressive effect on search.  The search on their frontend appears faster than magento and is based on score to bring in relevance of search.

7)      Magento is much SEO friendly than prestashop.

8)      In the prestashop the upgrade strategy is not clearly defined.  The upgrade impact on existing customizations is unsure in prestashop. On the other hand Magento’s customization scheme depends on the excellent OOP concept of subclasses and method. And this is extensively useful in keeping the customizations apart from Magento’s main releases.

9)      As mention above prestashop uses a smarty template system and javascript based on Jquery so the complete OOP coding offers a lot of flexibility for design. Magento’s design seems to be difficult than prestashop so don’t bother much with magento design.

10)   Flip side, the back office of Magento is less intuitive and technical structure it required more specialized skills for any adjustment.

11)   Magento Community have 130,000 members, Prestashop have 30000 members Community. Some approaches like magento team involvement, video tutorial, screen casts are work behind the wonderful magento community.

Read More...

Monday, August 3, 2009

jQuery Image Gallery/Slideshow Plugins and Tutorials

Image galleries, sliders and slideshows have become increasingly popular within webpages over the last year or so, and with jQuery becoming ever more popular, more and more developers have been creating these amazing powerful, versatile and sleek galleries. Thank you jQuery.
Below you will the most powerful, the most creative and most versatile of jQuery plugins and tutorials built using jQuery.

Galleriffic jQuery Plugin
Galleriffic was inspired by Mike Alsup's Cycle plugin, but with performance in mind for delivering a high volume of photos. This is my first experiment with jQuery, so I would love feedback on how to improve this plugin. I am not so great at spelling, and it was much later that I realized that the more appropriate spellings would be Gallerific or Gallerrific, but is too late now for a name change, so Galleriffic remains.

null



Examples



Features



  • Smart image preloading after the page is loaded

  • Thumbnail navigation (with pagination)

  • Support for bookmark-friendly URLs per-image

  • Slideshow (with optional auto-updating url bookmarks)

  • Events that allow for adding your own custom transition effects

  • Support for image captions

  • Flexible configuration

  • Graceful degradation when javascript is not available

  • Support for multiple galleries per page


Supersized – Full Screen Background/Slideshow jQuery Plugin

Supersized is the first fullscreen image gallery/slideshow that I have seen that really looks amazing, its transition effects are hypnotic and its controls are simple. The most amazing thing about Supersized is that it gives the impression of being a desktop application. Amazing plugin.


Features :
- Resizes images to fill browser while maintaining image dimension ratio.
- Cycles Images/backgrounds via slideshow with transitions and preloading.
- Navigation controls allow for pause/play and forward/back.
- Almost endless options.
Demo : Supersized Demo »

Building a jQuery Image Scroller

In this tutorial, you’re going to be building an image scroller, making use of jQuery’s excellent animation features and generally having some fun with code. This scroller will be different from the others in that it will be completely autonomous and will begin scrolling once the page loads.
Demo : jQuery Image Scroller »

Creating an Image Slider
In this tutorial you will learn how to create an image slider that when a holder is hovered over, the top image slides down to reveal the image underneath. You will also learn how to use position absolute to float an image in the top right to show the image is new.

Link : Creating an Image Slider »
Demo : Creating an Image Slider Demo »

Galleria jQuery Plugin
Galleria is a javascript image gallery written in jQuery. It loads the images one by one from an unordered list and displays thumbnails when each image is loaded. It will create thumbnails for you if you choose so, scaled or unscaled, centered and cropped inside a fixed thumbnail box defined by CSS. Very cool plugin.

Features :
- Unobtrusive javascript.
- Degrades gracefully if the browser doesn’t support javascript or CSS.
- Lightweight (4k packed).
- Displays the thumbnail when the actual image is loaded.
- CSS powered – create your own gallery style.
- Super fast image browsing since the images are preloaded one at a time in the background.
- Can scale thumbnails and crop to fit in thumbnail container.
- Can be used with custom thumbnails.
- Stylable caption from image or anchor title.
- jQuery plugin – takes one line to implement.
- Can adjust the history object and enable the back button in your browser.
- Can fire events so you can customize the images behaviour onLoad.
Demo : Galleria Demo »

Create a Beautiful jQuery Slider Tutorial

This tutorial shows you how to develop a beautiful jQuery slider with added image description and name. The final result is a very smooth and visually pleasing slideshow which could be easily integrated into any site.



Link : jQuery Slider Tutorial »
Demo : jQuery Slider Tutorial Demo »

GalleryView jQuery Plugin

GalleryView is a content-gallery plugin capable of displaying any HTML content in an animated gallery view. This plugin is bounding with options and you would be hard pressed to not use this plugin. GalleryView does require the jQuery Timers plugin to facilitate timing of animation events.

Link : GalleryView jQuery Plugin »
Demo : GalleryView jQuery Plugin Demo »
Read More...

Saturday, December 20, 2008

Using jQuery with Other Libraries

General


The jQuery library, and virtually all of its plugins are constrained within the jQuery namespace. As a general rule, "global" objects are stored inside the jQuery namespace as well, so you shouldn't get a clash between jQuery and any other library (like Prototype, MooTools, or YUI).

That said, there is one caveat: By default, jQuery uses "$" as a shortcut for "jQuery"


Overriding the $-function


However, you can override that default by calling jQuery.noConflict() at any point after jQuery and the other library have both loaded. For example:
 <html>
<head>
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
jQuery.noConflict();

// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();
</script>
</head>
<body></body>
</html>

This will revert $ back to its original library. You'll still be able to use "jQuery" in the rest of your application.

Additionally, there's another option. If you want to make sure that jQuery won't conflict with another library - but you want the benefit of a short name, you could do something like this:
 <html>
<head>
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
var $j = jQuery.noConflict();

// Use jQuery via $j(...)
$j(document).ready(function(){
$j("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();
</script>
</head>
<body></body>
</html>

You can define your own alternate names (e.g. jq, $J, awesomeQuery - anything you want).

Finally, if you don't want to define another alternative to the jQuery name (you really like to use $ and don't care about using another library's $ method), then there's still another solution for you. This is most frequently used in the case where you still want the benefits of really short jQuery code, but don't want to cause conflicts with other libraries.
 <html>
<head>
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
jQuery.noConflict();

// Put all your code in your document ready area
jQuery(document).ready(function($){
// Do jQuery stuff using $
$("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();
</script>
</head>
<body></body>
</html>

This is probably the ideal solution for most of your code, considering that there'll be less code that you'll have to change, in order to achieve complete compatibility.

Also see: Custom Alias


Including jQuery before Other Libraries


If you include jQuery before other libraries, you may use "jQuery" when you do some work with jQuery, and the "$" is also the shortcut for the other library. There is no need for overriding the $-function by calling "jQuery.noConflict()".
 <html>
<head>
<script src="jquery.js"></script>
<script src="prototype.js"></script>
<script>
// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();
</script>
</head>
<body></body>
</html>


Referencing Magic - Shortcuts for jQuery


If you don't like typing the full "jQuery" all the time, there are some alternative shortcuts:

  • Reassign jQuery to another shortcut

    • var $j = jQuery;

    • (This might be the best approach if you wish to use different libraries)



  • Use the following technique, which allows you to use $ inside of a block of code without permanently overwriting $:

    • (function($) { /* some code that uses $ */ })(jQuery)

    • Note: If you use this technique, you will not be able to use Prototype methods inside this capsuled function that expect $ to be Prototype's $, so you're making a choice to use only jQuery in that block.



  • Use the argument to the DOM ready event:

    • jQuery(function($) { /* some code that uses $ */ });

    • Note: Again, inside that block you can't use Prototype methods



Read More...

How jQuery Works

The Basics


This is a basic tutorial, designed to help you get started using jQuery. If you don't have a test page setup yet, start by creating a new HTML page with the following contents:
  <html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
// Your code goes here
</script>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
</body>
</html>

Edit the src attribute in the script tag to point to your copy of jquery.js. For example, if jquery.js is in the same directory as your HTML file, you can use:
 <script type="text/javascript" src="jquery.js"></script>

You can download your own copy of jQuery from the Downloading jQuery page.


Launching Code on Document Ready


The first thing that most Javascript programmers end up doing is adding some code to their program, similar to this:
 window.onload = function(){ alert("welcome"); }

Inside of which is the code that you want to run right when the page is loaded. Problematically, however, the Javascript code isn't run until all images are finished downloading (this includes banner ads). The reason for using window.onload in the first place is due to the fact that the HTML 'document' isn't finished loading yet, when you first try to run your code.

To circumvent both problems, jQuery has a simple statement that checks the document and waits until it's ready to be manipulated, known as the ready event:
 $(document).ready(function(){
// Your code here
});

The remaining jQuery examples will need to be placed inside the ready event so that they are executed when the document is ready to be worked on. Add the next section of code:
 $("a").click(function(event){
alert("Thanks for visiting!");
});

Save your HTML file and reload the test page in your browser. Clicking the link on the page should make a browser's alert pop-up, before leaving to go to the main jQuery page.

For click and most other events, you can prevent the default behaviour - here, following the link to jquery.com - by calling event.preventDefault() in the event handler:
 $("a").click(function(event){
alert("As you can see, the link no longer took you to jquery.com");
event.preventDefault();
});

Adding a CSS Class


Another common task is adding (or removing) a CSS (Cascading Style Sheet) class.
First, if you were to add some style information into the header of your script, like this:
 <style type="text/css">
a.test { font-weight: bold; }
</style>

and then added the addClass call -
  $("a").addClass("test");

all your a elements would now be bold. To remove the class, you'd use removeClass
 $("a").removeClass("test");


  • CSS allows multiple classes to be added to an element.)



Special Effects


In jQuery, a couple of handy effects are provided, to really make your web site stand out. To put this to the test, change the click that you added earlier to this:
 $("a").click(function(event){
event.preventDefault();
$(this).hide("slow");
});

Now, if you click any link, it should make itself slowly disappear.


Chainability (The Magic of jQuery)


jQuery uses an interesting concept called a "Builder" to make its code short and simple. The Builder pattern is an object-oriented programming design pattern that has been gaining popularity.

In a nutshell: Every method within jQuery returns the query object itself, allowing you to 'chain' upon it, for example:
 $("a").addClass("test").show().html("foo");

Each of those individual methods (addClass, show, and html) return the jQuery object, allowing you to continue applying methods to the current set of elements.

You can take this even further, by adding or removing elements from the selection, modifying those elements and then reverting to the old selection, for example:
 $("a")
.filter(".clickme")
.click(function(){
alert("You are now leaving the site.");
})
.end()
.filter(".hideme")
.click(function(){
$(this).hide();
return false;
})
.end();

Which would work against the following HTML:
<a href="http://google.com/" class="clickme">I give a message when you leave</a>

<a href="http://yahoo.com/" class="hideme">Click me to hide!</a>

<a href="http://microsoft.com">I'm a normal link</a>

Methods that modify the jQuery selection and can be undone with end(), are the following:

  • add(),

  • children(),

  • eq(),

  • filter(),

  • find(),

  • gt(),

  • lt(),

  • next(),

  • not(),

  • parent(),

  • parents() and

  • siblings().


Please check the Traversing API documentation for details of these methods.


Callbacks and Functions


A callback is a function that is passed as an argument to another function and is executed after its parent function has completed. The special thing about a callback is that functions that appear after the "parent" can execute before the callback executes.

Another important thing to know is how to properly pass the callback. This is where I have often forgotten the proper syntax.


Callback without arguments


For a callback with no arguments you pass it like this:
 $.get('myhtmlpage.html', myCallBack);

Note that the second parameter here is simply the function name (but not as a string and without parentheses). Functions in Javascript are 'First class citizens' and so can be passed around like variable references and executed at a later time.


Callback with arguments


"What do you do if you have arguments that you want to pass?", you might ask yourself.


Wrong


The Wrong Way (will not work!)
 $.get('myhtmlpage.html', myCallBack(param1, param2));

This will not work because it calls
myCallBack(param1, param2)

and then passes the return value as the second parameter to $.get().


Right


The problem with the above example is that myCallBack(param1, param2) is evaluated before being passed as a function.

In the below usage, an anonymous function is created (just a block of statements) and is registered as the callback function. Note the use of 'function(){'. The anonymous function does exactly one thing: calls myCallBack, with the values of param1 and param2 in the outer scope.
$.get('myhtmlpage.html', function(){
myCallBack(param1, param2);
});

param1 and param2 are evaluated as a callback when the '$.get' is done getting the page.
Read More...

Thursday, December 18, 2008

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
Read More...
Hosting Murah Domain Murah Indonesia, Pelayanan terbaik Fasilitas lengkap dan Limit bandwith lebih tinggi

Infolinks In Text Ads