Add jquery built in apiwork

Posted March 5th, 2010 in blog by admin

haha. I add jquery for default. Here, I use in my view like this

<html>
<head>
<?php
/*
add script from code.jquery.com
$this->jq->get_latest();
*/
//you can also load like this $this->load->js('jquery');
//$this->jq->noconfilt=true //for jquery no conflit
$this->jq->get_script();
?>
<script>
<?php $this->jq->start_jq(); ?>

alert("I'm jquery");

<?php $this->jq->end_jq(); ?>
</script>
</head>
<body>

</body>
</html>

jQbox

Posted January 10th, 2010 in blog by admin

jQbox is a jquery plugin for alert, confirm , html box. In Web 2.0 , we don’t want to use tradional alert, confirm box. So, I decided to write jQbox plugin. In my office, I always use popup insted of alert , confirm , upload, ajax , etc… So, I think, I should write plugin and I can use easily all the time.

Download

How to use

Source

Demo 

Ornagai Dictionary with Jquery + JSON

Posted September 14th, 2009 in blog by admin

Today, I am making ornagai dictionary with jquery. I was thinking about at 7:00 at English Tuition. At 12:00 pm, I was staring the code for that. It was complete in a half hour. However, it’s using 20 KB JSON file. So, I thought it, “Can I do complete dictionary in one JSON file ? ” I export the JSON from mysql database. It had 4 MB. And then run in my code. Oop!!! My firefox had been hung. I restart my firefox and changing my code. I will show just 9 results and try again it. It was ok but too long to wait. So, I decided to make index the JSON. I made a.json to z.json and then search again. Amazing… I said “Awesome!!!” It’s so fast and unbelievable searching. I love jquery and JSON. I finished that project just in 2 hours. You can download JqueryDict in there. I am thinking about Myanmar to the English dictionary with JqueryDict but it should make many indexs for ka to arh. So, I will do when I have a free time.

 

Cheer!!!

Twitter Lik Search with Jquery

Posted August 11th, 2009 in blog by admin

Yesterday, I post about Ajax search with Jquery and PHP. Today, I found another search form 9lessons blog. It also use Jquery and PHP. You can see in there.

Ajax Search When textbox change (JQUERY + PHP)

Posted August 11th, 2009 in blog by admin

It can make easy with jquery and php. Jqueyr also include ajax function and we can make easily that. First download jquery file from www.jquery.com. I made search.html and code is follwoing.

searching.html

[sourcecode lang="xhtml"]<html>
<head>
<title>AJAX Search Simple</title>
<script src=”jquery.js”></script>
<script>
$(document).ready(function() {

    $(“#q”).keyup(function(event){
        value=$(this).val();
        $(“#result”).html(“<b>Searching…</b>”);
        $(“#result”).load(“result.php?data=”+value);
    });

});
</script>
</head>
<body>
<input type=”text” id=”q”>
<div id=”result”></div>
<body>

</html>[/sourcecode]

I am using keyup function for id q. ( #q mean id q that is textbox ) After keyup get value from text box and write text searching in result (div). I send query string to result.php. You will see result.php is following

result.php

[sourcecode lang="php"]
<?php
//You can write some code in there.
//Connect Database and make sql query in here
echo “Search For “.$_GET['data'];
?>[/sourcecode]

You should add some code in PHP for search in database. It’s a simple. You can download complete code in here.

Page 1 of 212