Today this thing got me frustrated, let’s straight to the main problem, before I forget create js function to load from an URL contains json…
Comments closedCategory: Javascript/Jquery
Magento : Infinite Scroll for WordPress Posts Integration on Magento
i wrote some jquery script to perform infinite scroll WordPress posts on magento site, here you go <style> /*hide the toolbars */ .pager.pager-no-toolbar{ display:none; }…
Leave a CommentCSS tricks for Cross Browser Issues
if you a web developer, this is one the most common issue when you develop a website, yes… some css script not working properly on…
Leave a CommentJQuery: Manipulate Select Button
here some jquery tricks for select button: anyway, i just use following tricks coulpe minutes ago 😀 here we go! /* sort options by text…
Leave a CommentMagento : Add certain tags (iframe, script, etc) in CMS editor?
this is useful trick, i found on stackoverflow monggo gan open js/mage/adminhtml/wysiwyg/tiny_mce/setup.js find this block : var settings = { mode : (mode != undefined…
Leave a CommentPHP Script to Check Magento Server Requirement
use this script to check is your server meet the requirement to run Magento enjoy gan !!! <?php extension_check(array( ‘curl’, ‘dom’, ‘gd’, ‘hash’, ‘iconv’, ‘mcrypt’,…
1 CommentjQuery : Increase / Decrease All Element Font Size
just figure it out couple minutes ago, hope this is useful jQuery(‘body’).each(function(index) { jQuery(this).find(‘*’).each(function() { var cur_size =Â jQuery(this).css(‘font-size’); //alert(cur_size); cur_size = cur_size.replace(“px”,””); jQuery(this).css(‘font-size’, (cur_size…
Leave a CommentjQuery: Detect if Browser Scrollable
to detect when browser is scrollable, use below jQuery script: if (jQuery(document).height() > jQuery(window).height()) { //alert(‘scroll bar exist’); }else { //alert(‘scroll bar Not exist’);…
Leave a CommentCSS: Animate with CSS Only
this example css code, to perform animate like jQuery, but without any js code, but following code works on modern browser only <style> .theBox…
Leave a CommentHTML : Avoid Page Cache
this an old trick, but very useful for me, especially when dealing with html page only or simple php, here you go, put this code…
1 CommentJavascript: Create Map Directions by Google Maps
i will show you, example code, how to create map directions use Googgle Map, here is the code: <style> #map_canvas { width: 100%; height:…
Leave a CommentjQuery: Search String Inside DIV tag
let say..you want to modify/add style inside DIV tag contains “Jhon” string below example the code <div>John Resig</div> <div>George Martin</div> <div>Malcom John Sinclair</div> <div>J. Ohn</div>…
Leave a CommentjQuery: Stupid Way to Create Tabs
it is very stupid way to create jquery tabs… the CSS code: .product-tabs li a{ float: left; display: block; padding: 20px 0px; width: 187px; text-align:…
Leave a CommentjQuery:Animated Scroll Back to Top
this example of jQuery snippet for animated scroll-up <a href=”#”>Back to Top</a> <script> $(document).ready(function(){ $(‘#do-nothing’).click(function(e) { $(‘body,html’).animate({“scrollTop”:0},’slow’); }); }); </script>
Leave a CommentjQuery: Prevent Href/Hyperlink
This snippet will prevent the default behaviour of a hyperlink <a href=”#”>Go </a> <script> $(document).ready(function(){ $(‘#do-nothing’).click(function(e) { e.preventDefault(); }); }); </script>
Leave a CommentMagento: Add External JS/CSS File to Header Tag
this is example how to add an external JS/CSS files to magento header into layout file : <default> <reference name=”head”> <block type=”core/text” name=”google.cdn.jquery”> <action method=”setText”>…
Leave a Comment