Browsing articles tagged with " jquery"

Hide Checkbox and Label based on Label text

Mar 13, 2012   //   by phpfreelancer.biz   //   Blog, Jquery Tutorial  //  No Comments

The label text of a checkbox is dynamically generated in CodeCharge. The label text includes the amount of available articles. When this number is (0), the checkbox and the label text should be hidden, if not both checkbox and label value must be shown.

In this case checkbox and label text hidden:

<input id="i_search_2_newdatad9_1" name="d9[]" value="standplaatsreis" type="checkbox"  /><label for="i_search_2_newdatad9_1">Standplaatsreis (0)</label>

in this case checkbox and label visible:

<input id="i_search_2_newdatad9_1" name="d9[]" value="standplaatsreis" type="checkbox"  /><label for="i_search_2_newdatad9_1">Standplaatsreis (8)</label>

how it can be obtained using jquery script. Read more >>

jQuery – why isn’t this simple function working?

Mar 13, 2012   //   by phpfreelancer.biz   //   Blog, Jquery Tutorial  //  No Comments

I’m building a web application and I’ve decided to have a fiddle with jQuery and Javascript – something I’ve never really used before.

I have included jQuery in my header using Google Libraries:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

And now I’m fiddling with the SIMPLEST of jQuery but it’s not working.

<p><a href="#" id="lovecounter"><?php if ($post->love) { echo $post->love; } else { echo 0; } ?></a></p>

<script type="text/javascript">

$("#lovecounter").click(function() {
  alert("Click");
});         

</script>

I am clicking on the lovecounter link but there is no alert. If I add simple javascript to the actual anchor tag it works though.

<p><a href="#" id="lovecounter" onclick="alert('test')"><?php if ($post->love) { echo $post->love; } else { echo 0; } ?></a></p>

Any ideas? What am I doing wrong? Read more >>

PHP mail using Gmail

Mar 12, 2012   //   by phpfreelancer.biz   //   Blog, PHP Tutorial  //  No Comments

I’d like to use my Gmail account for sending these. How could this be done? Read more >>

Share This Page

RSS Wordpress News